I'm very, VERY new to using JavaFX and FXML in general, and I've run into a bit of a problem that I've not been able to solve either through repeated Google searches, or searches here on Stack Exchange. While others have had similar problems, I haven't been able to replicate their solutions within my own project.
Right now, I'm mostly just trying to test JavaFX with FXML and get a feel for it... however I can't even get it to load, as FXMLLoader is giving me the following error.
javafx.fxml.LoadException:
/C:/Users/Dylon/workspace/Convergence_titanExplorationModule/bin/com/test/fxml/ExplorationModuleUI.fxml
at javafx.fxml.FXMLLoader.constructLoadException(Unknown Source) at
javafx.fxml.FXMLLoader.importClass(Unknown Source) at
javafx.fxml.FXMLLoader.processImport(Unknown Source) at
javafx.fxml.FXMLLoader.processProcessingInstruction(Unknown Source)
at javafx.fxml.FXMLLoader.loadImpl(Unknown Source) at
javafx.fxml.FXMLLoader.loadImpl(Unknown Source) at
javafx.fxml.FXMLLoader.loadImpl(Unknown Source) at
javafx.fxml.FXMLLoader.loadImpl(Unknown Source) at
javafx.fxml.FXMLLoader.loadImpl(Unknown Source) at
javafx.fxml.FXMLLoader.loadImpl(Unknown Source) at
javafx.fxml.FXMLLoader.loadImpl(Unknown Source) at
javafx.fxml.FXMLLoader.load(Unknown Source) at
com.test.fxml.Main.start(Main.java:14) at
com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$163(Unknown
Source) at
com.sun.javafx.application.PlatformImpl.lambda$runAndWait$176(Unknown
Source) at
com.sun.javafx.application.PlatformImpl.lambda$null$174(Unknown
Source) at java.security.AccessController.doPrivileged(Native Method)
at
com.sun.javafx.application.PlatformImpl.lambda$runLater$175(Unknown
Source) at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(Unknown
Source) at com.sun.glass.ui.win.WinApplication._runLoop(Native
Method) at
com.sun.glass.ui.win.WinApplication.lambda$null$149(Unknown Source)
at java.lang.Thread.run(Unknown Source) Caused by:
java.lang.ClassNotFoundException at
javafx.fxml.FXMLLoader.loadType(Unknown Source) ... 21 more
Now, here's the code I'm working with...
package com.test.fxml;
import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.stage.Stage;
import javafx.scene.Parent;
import javafx.scene.Scene;
public class Main extends Application {
#Override
public void start(Stage primaryStage) {
try {
Parent root = FXMLLoader.load(getClass().getResource("/com/test/fxml/ExplorationModuleUI.fxml"));
Scene scene = new Scene(root,400,400);
primaryStage.setScene(scene);
primaryStage.show();
} catch(Exception e) {
e.printStackTrace();
}
}
Here's my FXML file, named ExplorationModuleUI.fxml...
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.layout.*?>
<?import javafx.scene.control*?>
<BorderPane xmlns:fx="http://javafx.com/fxml/1">
<TOP>
<HBox>
<Button text = "test"/>
</HBox>
</TOP>
</BorderPane>
Finally, here's how I have things laid out in regards to folders.
I can't post images yet so here's a link to one instead
Any help is greatly appreciated. I honestly haven't been able to figure out why it doesn't work even after digging about for a couple of hours tonight. I've tried other solutions I've found on here and in Google searches, but nothing has worked yet. If you have any questions feel free to ask and I'll get back to you as soon as I can in the morning.
First, your second import is missing a dot between control and *, it should be import javafx.scene.control.*
Second, TOP is not a valid element for fxml, use top instead (all lowercase).
Related
When i change the xsl:include to xsl:import it somehow works and doesnt return an empty file. I am using the Xslt30Processor class and function Xslt30Processor::TransformFiletoFile(), even The transform.c doesnt work. When my xslt has a "xsl:result-document"
statement it also doesnt work.
I even tried using a previous version of Saxon/C (The 1.2.0 series) , and even that didnt work. Is there any option where it enables the use of xsl:include or something.
This works for Java and .NET but not for the C API.
I don't get any errors or exceptions when using JNI.
Please help.
Here a small example which demostrates the problem:
source.xml:
<xml/>
main.xsl:
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="text" encoding="utf-8" standalone="yes"/>
<xsl:include href="referenced.xsl" />
<xsl:template match="/">hello</xsl:template>
</xsl:stylesheet>
referenced.xsl:
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:f="my-functions.org"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
version="2.0">
<xsl:function name="f:next-nr" as="xs:integer">
<xsl:param name="node"/>
<xsl:sequence select="xs:integer(replace($node, '\D', ''))"/>
</xsl:function>
</xsl:stylesheet>
When running the C version of Transform.exe, no errors are returned and no output is produced. I noticed when putting together this test case that it doesn't matter if I change the include to import for this example. If I use the Transform.exe that comes in the tools folder of Saxon 10.6, a file is produced as expected. I can't, however, find any C/C++ files for Saxon 10.6.
The issue with result-document is a separate issue with the same outcome.
I think I have found one reason why the stylesheet fails on compilation, it seems a build/configuration problem with HE not finding categories.xml.
Stack trace from compilation:
Exception in thread "main" java.lang.ExceptionInInitializerError
at net.sf.saxon.regex.RECompiler.escape(Unknown Source)
at net.sf.saxon.regex.RECompiler.parseTerminal(Unknown Source)
at net.sf.saxon.regex.RECompiler.piece(Unknown Source)
at net.sf.saxon.regex.RECompiler.parseBranch(Unknown Source)
at net.sf.saxon.regex.RECompiler.parseExpr(Unknown Source)
at net.sf.saxon.regex.RECompiler.compile(Unknown Source)
at net.sf.saxon.regex.ARegularExpression.<init>(Unknown Source)
at net.sf.saxon.java.JavaPlatform.compileRegularExpression(Unknown Source)
at net.sf.saxon.Configuration.compileRegularExpression(Unknown Source)
at net.sf.saxon.functions.RegexFunction.tryToBindRegularExpression(Unknown Source)
at net.sf.saxon.functions.RegexFunction.makeFunctionCall(Unknown Source)
at net.sf.saxon.functions.Replace.makeFunctionCall(Unknown Source)
at net.sf.saxon.functions.RegexFunctionSansFlags.makeFunctionCall(Unknown Source)
at net.sf.saxon.functions.registry.BuiltInFunctionSet.bind(Unknown Source)
at net.sf.saxon.functions.FunctionLibraryList.bind(Unknown Source)
at net.sf.saxon.expr.parser.XPathParser.parseFunctionCall(Unknown Source)
at net.sf.saxon.expr.parser.XPathParser.parseBasicStep(Unknown Source)
at net.sf.saxon.expr.parser.XPathParser.parseStepExpression(Unknown Source)
at net.sf.saxon.expr.parser.XPathParser.parseRelativePath(Unknown Source)
at net.sf.saxon.expr.parser.XPathParser.parsePathExpression(Unknown Source)
at net.sf.saxon.expr.parser.XPathParser.parseSimpleMappingExpression(Unknown Source)
at net.sf.saxon.expr.parser.XPathParser.parseUnaryExpression(Unknown Source)
at net.sf.saxon.expr.parser.XPathParser.parseExprSingle(Unknown Source)
at net.sf.saxon.expr.parser.XPathParser.parseFunctionCall(Unknown Source)
at net.sf.saxon.expr.parser.XPathParser.parseBasicStep(Unknown Source)
at net.sf.saxon.expr.parser.XPathParser.parseStepExpression(Unknown Source)
at net.sf.saxon.expr.parser.XPathParser.parseRelativePath(Unknown Source)
at net.sf.saxon.expr.parser.XPathParser.parsePathExpression(Unknown Source)
at net.sf.saxon.expr.parser.XPathParser.parseSimpleMappingExpression(Unknown Source)
at net.sf.saxon.expr.parser.XPathParser.parseUnaryExpression(Unknown Source)
at net.sf.saxon.expr.parser.XPathParser.parseExprSingle(Unknown Source)
at net.sf.saxon.expr.parser.XPathParser.parseExpression(Unknown Source)
at net.sf.saxon.expr.parser.XPathParser.parse(Unknown Source)
at net.sf.saxon.expr.parser.ExpressionTool.make(Unknown Source)
at net.sf.saxon.style.StyleElement.makeExpression(Unknown Source)
at net.sf.saxon.style.XSLSequence.prepareAttributes(Unknown Source)
at net.sf.saxon.style.StyleElement.<unknown>(Unknown Source)
at net.sf.saxon.style.StyleElement.processAllAttributes(Unknown Source)
at net.sf.saxon.style.StyleElement.processAllAttributes(Unknown Source)
at net.sf.saxon.style.PrincipalStylesheetModule.processAllAttributes(Unknown Source)
at net.sf.saxon.style.PrincipalStylesheetModule.preprocess(Unknown Source)
at net.sf.saxon.style.Compilation.compilePackage(Unknown Source)
at net.sf.saxon.style.StylesheetModule.loadStylesheet(Unknown Source)
at net.sf.saxon.style.Compilation.compileSingletonPackage(Unknown Source)
at net.sf.saxon.s9api.XsltCompiler.compile(Unknown Source)
at net.sf.saxon.option.cpp.Xslt30Processor.getXslt30Transformer(Unknown Source)
at net.sf.saxon.option.cpp.Xslt30Processor.transformToFile(Unknown Source)
Caused by: java.lang.RuntimeException: Unable to read categories.xml file
at net.sf.saxon.regex.charclass.Categories.build(Unknown Source)
at net.sf.saxon.regex.charclass.Categories.getCategory(Unknown Source)
at net.sf.saxon.regex.charclass.Categories.<clinit>(Unknown Source)
... 47 more
So it is neither xsl:include nor xsl:result-document that causes the compilation failure, it seems the HE build does not have or does not find its categories.xml file when trying to compile the regular expression in the included code.
As a workaround, it might be possible to run SaxonC EE 11.2 without a license (-license:off), I think, as it then simply uses HE features, while somehow the EE package is correctly built to find its categories.xml so it doesn't fail on compiling regular expressions.
I have raised https://saxonica.plan.io/issues/5372 about the categories.xml file failure.
This question already has an answer here:
How do I determine the correct path for FXML files, CSS files, Images, and other resources needed by my JavaFX Application?
(1 answer)
Closed 2 years ago.
I am trying to create a JavaFX program, and every time I try to run my code I am getting an exception - I'm not entirely sure what it means though ...
My code:
package com.PickingList.ui;
import java.io.IOException;
import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.stage.Stage;
public class Main extends Application {
private Stage stage;
#Override
public void start(Stage primaryStage) throws IOException {
Scene scene;
FXMLLoader loader = new FXMLLoader(this.getClass().getResource("./TelaLogin.fxml"));
Parent root = loader.load();
stage.setScene(new Scene(root));
stage.setTitle("Login");
stage.show();
}
public static void main(String[] args) {
launch(args);
}
}
I'm using Eclipse to create the project, and I'm getting the following error:
Exception in Application start method
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:389)
at com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:328)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at sun.launcher.LauncherHelper$FXHelper.main(Unknown Source)
Caused by: java.lang.RuntimeException: Exception in Application start method
at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:917)
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$1(LauncherImpl.java:182)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.IllegalStateException: Location is not set.
at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2434)
at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2409)
at com.PickingList.ui.Main.start(Main.java:19)
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$8(LauncherImpl.java:863)
at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$7(PlatformImpl.java:326)
at com.sun.javafx.application.PlatformImpl.lambda$null$5(PlatformImpl.java:295)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl.lambda$runLater$6(PlatformImpl.java:294)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.lambda$null$4(WinApplication.java:186)
Exception running application com.PickingList.ui.Main
enter image description here
Try:
FXMLLoader loader = new FXMLLoader(this.getClass().getResource("/TelaLogin.fxml"));
Assuming that, your folder structure looks like:
/src/TelaLogin.fxml
I'm working on a mp3 player which is using a JavaFX UI. When I start the application in NetBeans, it works fine. But when I create an executable jar with Clean and Build and start it with the cmd, I get an exception where the FXMLLoader loads the fxml file.
There must be a problem with the paths, right?
First Project Structure
Project Structure
I created a second application and stored everything in one folder. Created an executable jar and it worked fine.
Second Project Structure
Project Structure
Source Code (First)
package jornsfx;
import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.stage.Stage;
public class JornsFX extends Application{
#Override
public void start(Stage stage)throws Exception{
stage.setResizable(false);
Parent root = FXMLLoader.load(getClass().getResource("/views/jornsFX.fxml"));
Scene scene = new Scene(root);
stage.setScene(scene);
stage.setTitle("JornsFX");
stage.show();
}
public static void main(String[] args) {
launch(args);
}
}
Exception (First)
Exception in Application start method
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:389)
at com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:328)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at sun.launcher.LauncherHelper$FXHelper.main(Unknown Source)
Caused by: java.lang.RuntimeException: Exception in Application start method
at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:917)
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$155(LauncherImpl.java:182)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException: Location is required.
at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3207)
at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3175)
at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3148)
at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3124)
at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3104)
at javafx.fxml.FXMLLoader.load(FXMLLoader.java:3097)
at jornsfx.JornsFX.start(JornsFX.java:14)
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$162(LauncherImpl.java:863)
at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$175(PlatformImpl.java:326)
at com.sun.javafx.application.PlatformImpl.lambda$null$173(PlatformImpl.java:295)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl.lambda$runLater$174(PlatformImpl.java:294)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.lambda$null$148(WinApplication.java:191)
... 1 more
Exception running application jornsfx.JornsFX
I can't tell you for certain, but it looks like
getClass().getResource("/views/jornsFX.fxml")
in your start() method is null. The exception suggests it and also the file is named /views/JornsFX.fxml in the screenshot.
I'm trying to create javafx applet, using IntelliJ Idea. After building I get three files: .jar, .jnlp and .html. If I launch jar all works fine, but if I try to run app using jnlp or html it throws exception:
java.lang.NullPointerException: Location is required.
at javafx.fxml.FXMLLoader.loadImpl(Unknown Source)
at javafx.fxml.FXMLLoader.loadImpl(Unknown Source)
at javafx.fxml.FXMLLoader.loadImpl(Unknown Source)
at javafx.fxml.FXMLLoader.loadImpl(Unknown Source)
at javafx.fxml.FXMLLoader.loadImpl(Unknown Source)
at javafx.fxml.FXMLLoader.load(Unknown Source)
at sample.Main.start(Main.java:14)
at com.sun.javafx.applet.FXApplet2$2.run(Unknown Source)
at com.sun.javafx.application.PlatformImpl.lambda$null$170(Unknown Source)
at com.sun.javafx.application.PlatformImpl$$Lambda$45/31918841.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl.lambda$runLater$171(Unknown Source)
at com.sun.javafx.application.PlatformImpl$$Lambda$44/13936151.run(Unknown Source)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(Unknown Source)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.lambda$null$145(Unknown Source)
at com.sun.glass.ui.win.WinApplication$$Lambda$34/10055096.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Exception in thread "JavaFX Application Thread" java.lang.RuntimeException: java.lang.NullPointerException: Location is required.
at com.sun.javafx.applet.FXApplet2$2.run(Unknown Source)
at com.sun.javafx.application.PlatformImpl.lambda$null$170(Unknown Source)
at com.sun.javafx.application.PlatformImpl$$Lambda$45/31918841.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl.lambda$runLater$171(Unknown Source)
at com.sun.javafx.application.PlatformImpl$$Lambda$44/13936151.run(Unknown Source)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(Unknown Source)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.lambda$null$145(Unknown Source)
at com.sun.glass.ui.win.WinApplication$$Lambda$34/10055096.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException: Location is required.
at javafx.fxml.FXMLLoader.loadImpl(Unknown Source)
at javafx.fxml.FXMLLoader.loadImpl(Unknown Source)
at javafx.fxml.FXMLLoader.loadImpl(Unknown Source)
at javafx.fxml.FXMLLoader.loadImpl(Unknown Source)
at javafx.fxml.FXMLLoader.loadImpl(Unknown Source)
at javafx.fxml.FXMLLoader.load(Unknown Source)
at sample.Main.start(Main.java:14)
... 11 more
Why is it so? Jar exactly contains needed fxml located at the specified path.
Java:
package sample;
import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.stage.Stage;
public class Main extends Application {
#Override
public void start(Stage primaryStage) throws Exception{
Parent root = FXMLLoader.load(getClass().getResource("/sample/sample.fxml"));
primaryStage.setTitle("Hello World");
primaryStage.setScene(new Scene(root, 600, 400));
primaryStage.show();
}
public static void main(String[] args) {
launch(args);
}
}
FXML:
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<AnchorPane prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1">
<children>
<Button layoutX="173.0" layoutY="188.0" prefHeight="25.0" prefWidth="255.0" text="Button" />
</children>
</AnchorPane>
What am I doing wrong? Help please.
The problem is in this line:
Parent root = FXMLLoader.load(getClass().getResource("/sample/sample.fxml"));
It is pretty clear that the load method is actually being called with a null argument. And that happens because getResource("/sample/sample.fxml") cannot file that resource.
The resource is missing (or has the wrong path) on the runtime classpath.
This is a problem of security. The FXML file is considered as to be loaded from the filesystem of the client, but the "user.dir, read" permission is not tolerated by the Java security manager.
However, it is a problem of signing JavaFX applets. Once signed, the loading works well. Example here: http://web.univ-pau.fr/~barbier/PauWare/My_device/dist/My_device_JavaFX.html
BTW, there is no problem with JavaFX applications
(eg, http://www.franckbarbier.com/PauWare/Programmable_thermostat/) that have self-contained widgets in the code (no load of FXML file). Cheers!!
I have been trying to remove the empty rows from table view but i am not able to do that with css which i have read in some blog
here the css is which i am applying on that
/-------------------------------------------------
.table-row-cell:empty {
-fx-background-color: white;
}
.table-row-cell:empty .table-cell {
-fx-border-width: 0px;
}
/-------------------------------------------------
But iam getting the error
/------------------------------------
SEVERE: javafx.scene.control.Control loadSkinClass Failed to load skin 'com.sun.javafx.scene.control.skin.TableRowSkin' for control TableView#125ff34[styleClass=table-view table-row-cell]
java.lang.IllegalArgumentException: argument type mismatch
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
at javafx.scene.control.Control.loadSkinClass(Unknown Source)
at javafx.scene.control.Control.impl_cssSet(Unknown Source)
at javafx.scene.Node.impl_cssSet(Unknown Source)
at com.sun.javafx.css.StyleHelper.transitionToState(Unknown Source)
at javafx.scene.Node.impl_processCSS(Unknown Source)
at javafx.scene.Parent.impl_processCSS(Unknown Source)
at javafx.scene.control.Control.impl_processCSS(Unknown Source)
at javafx.scene.Parent.impl_processCSS(Unknown Source)
at javafx.scene.Parent.impl_processCSS(Unknown Source)
at javafx.scene.Node.processCSS(Unknown Source)
at javafx.scene.Node.processCSS(Unknown Source)
at javafx.scene.Scene.doCSSPass(Unknown Source)
at javafx.scene.Scene.access$2900(Unknown Source)
at javafx.scene.Scene$ScenePulseListener.pulse(Unknown Source)
at com.sun.javafx.tk.Toolkit.firePulse(Unknown Source)
at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(Unknown Source)
at com.sun.javafx.tk.quantum.QuantumToolkit$8.run(Unknown Source)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.access$100(Unknown Source)
at com.sun.glass.ui.win.WinApplication$2$1.run(Unknown Source)
at java.lang.Thread.run(Thread.java:722)
SEVERE: javafx.scene.control.Control impl_processCSS The -fx-skin property has not been defined in CSS for TableView#125ff34[styleClass=table-view table-row-cell]
/-------------------------------------------------------------
Does anybody have idea how to resolve it? or any other way to remove the empty rows.
Thanks in advance.
Your css worked for with JavaFX 2.1. Try next:
update to JavaFX 2.1
remove everything from your css file except these classes
this is the solution :
inside your css file add this :
.table-row-cell:empty:odd, .table-row-cell:empty:even {
-fx-background-color: transparent;
}
tested and worked for me
Click to show my tableview