The "Invalid Property" Error is thrown at Line 20, which is for the TextField. No idea as to why it is being thrown.

<?xml version="1.0" encoding="UTF-8"?>

<?import java.lang.*?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<?import javafx.scene.text.*?>

<VBox prefHeight="400.0" prefWidth="284.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1">
  <children>
    <AnchorPane maxHeight="-1.0" maxWidth="-1.0" prefHeight="375.0" prefWidth="285.0" VBox.vgrow="ALWAYS">
<children><Button fx:id="zero" layoutX="14.0" layoutY="321.0" mnemonicParsing="false" prefHeight="40.0" prefWidth="40.0" text="0" AnchorPane.bottomAnchor="14.0" AnchorPane.leftAnchor="14.0" AnchorPane.rightAnchor="230.0" /><Button fx:id="decimal" layoutX="54.0" layoutY="321.0" mnemonicParsing="false" prefHeight="40.0" prefWidth="40.0" text="." AnchorPane.bottomAnchor="14.0" AnchorPane.leftAnchor="68.0" AnchorPane.rightAnchor="176.0" /><Button fx:id="posneg" layoutX="94.0" layoutY="321.0" mnemonicParsing="false" prefHeight="40.0" prefWidth="40.0" text="+/-" AnchorPane.bottomAnchor="14.0" AnchorPane.leftAnchor="122.0" AnchorPane.rightAnchor="122.0" /><Button fx:id="one" layoutX="14.0" layoutY="271.0" mnemonicParsing="false" prefHeight="40.0" prefWidth="40.0" text="1" AnchorPane.bottomAnchor="68.0" AnchorPane.leftAnchor="14.0" AnchorPane.rightAnchor="230.0" /><Button fx:id="two" layoutX="54.0" layoutY="271.0" mnemonicParsing="false" prefHeight="40.0" prefWidth="40.0" text="2" AnchorPane.bottomAnchor="68.0" AnchorPane.leftAnchor="68.0" AnchorPane.rightAnchor="176.0" /><Button fx:id="three" layoutX="94.0" layoutY="271.0" mnemonicParsing="false" prefHeight="40.0" prefWidth="40.0" text="3" AnchorPane.bottomAnchor="68.0" AnchorPane.leftAnchor="122.0" AnchorPane.rightAnchor="122.0" /><Button fx:id="four" layoutX="14.0" layoutY="231.0" mnemonicParsing="false" prefHeight="40.0" prefWidth="40.0" text="4" AnchorPane.bottomAnchor="122.0" AnchorPane.leftAnchor="14.0" AnchorPane.rightAnchor="230.0" /><Button fx:id="five" layoutX="54.0" layoutY="231.0" mnemonicParsing="false" prefHeight="40.0" prefWidth="40.0" text="5" AnchorPane.bottomAnchor="122.0" AnchorPane.leftAnchor="68.0" AnchorPane.rightAnchor="176.0" /><Button fx:id="six" layoutX="94.0" layoutY="231.0" mnemonicParsing="false" prefHeight="40.0" prefWidth="40.0" text="6" AnchorPane.bottomAnchor="122.0" AnchorPane.leftAnchor="122.0" AnchorPane.rightAnchor="122.0" /><Button fx:id="seven" layoutX="14.0" layoutY="173.0" mnemonicParsing="false" prefHeight="40.0" prefWidth="40.0" text="7" AnchorPane.bottomAnchor="176.0" AnchorPane.leftAnchor="14.0" AnchorPane.rightAnchor="230.0" /><Button fx:id="eight" layoutX="68.0" layoutY="173.0" mnemonicParsing="false" prefHeight="40.0" prefWidth="40.0" text="8" AnchorPane.bottomAnchor="176.0" AnchorPane.leftAnchor="68.0" AnchorPane.rightAnchor="176.0" /><Button fx:id="nine" layoutX="122.0" layoutY="173.0" mnemonicParsing="false" prefHeight="40.0" prefWidth="40.0" text="9" AnchorPane.bottomAnchor="176.0" AnchorPane.leftAnchor="122.0" AnchorPane.rightAnchor="122.0" /><Button fx:id="equals" layoutX="162.0" layoutY="321.0" mnemonicParsing="false" prefHeight="40.0" prefWidth="94.0" text="=" AnchorPane.bottomAnchor="14.0" AnchorPane.leftAnchor="176.0" AnchorPane.rightAnchor="14.0">
<font>
<Font size="18.0" />
</font></Button><Button fx:id="oBracket" layoutX="176.0" layoutY="159.0" mnemonicParsing="false" prefHeight="40.0" prefWidth="40.0" text="(" AnchorPane.bottomAnchor="176.0" AnchorPane.leftAnchor="176.0" AnchorPane.rightAnchor="68.0">
<font>
<Font size="16.0" />
</font></Button><Button fx:id="cBracket" layoutX="230.0" layoutY="159.0" mnemonicParsing="false" prefHeight="40.0" prefWidth="40.0" text=")" AnchorPane.bottomAnchor="176.0" AnchorPane.leftAnchor="230.0" AnchorPane.rightAnchor="14.0">
<font>
<Font size="16.0" />
</font></Button><TextField fx:id="equation" alignment="CENTER_RIGHT" editable="false" layoutX="14.0" layoutY="144.0" prefHeight="40.0" prefWidth="256.0" AnchorPane.bottomAnchor="230.0" AnchorPane.leftAnchor="14.0" AnchorPane.rightAnchor="14.0">
<font>
<Font size="18.0" />
</font></TextField><ToggleButton fx:id="multiply" layoutX="176.0" layoutY="238.0" mnemonicParsing="false" prefHeight="40.0" prefWidth="40.0" text="×">
<font>
<Font size="18.0" />
</font></ToggleButton><ToggleButton fx:id="divide" layoutX="230.0" layoutY="238.0" mnemonicParsing="false" prefHeight="40.0" prefWidth="40.0" text="÷">
<font>
<Font size="18.0" />
</font></ToggleButton><ToggleButton fx:id="add" layoutX="176.0" layoutY="292.0" mnemonicParsing="false" prefHeight="40.0" prefWidth="40.0" text="+">
<font>
<Font size="18.0" />
</font>
</ToggleButton><ToggleButton fx:id="subtract" layoutX="230.0" layoutY="292.0" mnemonicParsing="false" prefHeight="40.0" prefWidth="40.0" text="-">
<font>
<Font size="18.0" />
</font>
</ToggleButton><Label fx:id="previousEquation" alignment="BOTTOM_RIGHT" contentDisplay="RIGHT" layoutX="216.0" layoutY="89.0" textAlignment="RIGHT" AnchorPane.rightAnchor="14.0">
<font>
<Font size="18.0" />
</font></Label><Label fx:id="fadeEquation" alignment="BOTTOM_RIGHT" contentDisplay="RIGHT" layoutX="216.0" layoutY="89.0" textAlignment="RIGHT" AnchorPane.rightAnchor="14.0">
<font>
<Font size="18.0" />
</font>
</Label><Button fx:id="clear" layoutX="20.0" layoutY="138.0" mnemonicParsing="false" prefHeight="20.0" prefWidth="40.0" text="←" AnchorPane.leftAnchor="20.0" />
</children>
    </AnchorPane>
  </children>
</VBox>

Also, I have Mathmatical Characters in there, such as the division symbol, will those be issues?

Recommended Answers

All 7 Replies

P.S. Heres the Error being thrown at Runtime.

Invalid property.
/C:/Users/GeoDoX/Documents/Java%20Workspace/Calculator%20(GUI)/bin/com/github/geodox/calculatorgui/main/Calculator.fxml:20
  at javafx.fxml.FXMLLoader$PropertyElement.<init>(FXMLLoader.java:1169)
  at javafx.fxml.FXMLLoader.createElement(FXMLLoader.java:2380)
  at javafx.fxml.FXMLLoader.processStartElement(FXMLLoader.java:2353)
  at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2172)
  at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2069)
  at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2830)
  at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2809)
  at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2795)
  at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2782)
  at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2771)
  at com.github.geodox.calculatorgui.main.Calculator.start(Calculator.java:25)
  at com.sun.javafx.application.LauncherImpl$5.run(LauncherImpl.java:319)
  at com.sun.javafx.application.PlatformImpl$5.run(PlatformImpl.java:219)
  at com.sun.javafx.application.PlatformImpl$4$1.run(PlatformImpl.java:182)
  at com.sun.javafx.application.PlatformImpl$4$1.run(PlatformImpl.java:179)
  at java.security.AccessController.doPrivileged(Native Method)
  at com.sun.javafx.application.PlatformImpl$4.run(PlatformImpl.java:179)
  at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:76)
  at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
  at com.sun.glass.ui.win.WinApplication.access$100(WinApplication.java:17)
  at com.sun.glass.ui.win.WinApplication$3$1.run(WinApplication.java:67)
  at java.lang.Thread.run(Unknown Source)

Apr 22, 2014 10:05:30 AM com.github.geodox.calculatorgui.main.Calculator start
SEVERE: 
javafx.fxml.LoadException: Invalid property.
    at javafx.fxml.FXMLLoader$PropertyElement.<init>(FXMLLoader.java:1169)
    at javafx.fxml.FXMLLoader.createElement(FXMLLoader.java:2380)
    at javafx.fxml.FXMLLoader.processStartElement(FXMLLoader.java:2353)
    at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2172)
    at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2069)
    at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2830)
    at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2809)
    at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2795)
    at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2782)
    at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2771)
    at com.github.geodox.calculatorgui.main.Calculator.start(Calculator.java:25)
    at com.sun.javafx.application.LauncherImpl$5.run(LauncherImpl.java:319)
    at com.sun.javafx.application.PlatformImpl$5.run(PlatformImpl.java:219)
    at com.sun.javafx.application.PlatformImpl$4$1.run(PlatformImpl.java:182)
    at com.sun.javafx.application.PlatformImpl$4$1.run(PlatformImpl.java:179)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sun.javafx.application.PlatformImpl$4.run(PlatformImpl.java:179)
    at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:76)
    at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
    at com.sun.glass.ui.win.WinApplication.access$100(WinApplication.java:17)
    at com.sun.glass.ui.win.WinApplication$3$1.run(WinApplication.java:67)
    at java.lang.Thread.run(Unknown Source)

I tried your fxml file in Netbeans/Java8 and it loaded OK and diplayed a (slighly wonky) calculator-type screen. No errors.
Maybe you have an old version, or a mismatch between the layout editor and the compiler versions???

Been using the same ones for a while now, maybe it's a problem with Eclipse that I can fix by restarting it.

How was it wonky?

Initially looks like this

732c545c04d43d76f48a1f56efde78b9

then resized...

b2779793e86ba380ed86ac5e31c7ff57

and resized again...

1b4d0144a782fb5697722bf6e52d2742

ps I don't want to start a flame war, but in my experience NetBeans is always well ahead of Eclipse in its support for new versions of Java, it usually has beta versions tracking the betas of the Java version, and a solid final release on the same day. Eclipse support seems to be held back with final testing etc only starting after the offical release of the Java version.

Same thing after restarting Eclipse. Even tried to remove the library and reattach it to the build path. Could SceneBuilder Update on it's own?
Maybe something changed through an update and the Libraries aren't up-to-date. I'll try updating the libraries.

I get what you mean with NetBeans, however I like the look and feel of Eclipse.

Installed the Latest Java, 1.7.0_55, and nothing.

EDIT: I got it working after some time of messing about, it turns out, TextFields do not like their Font Size to be changed.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.