com.gluonhq.charm.glisten.control.TextField does not exist

14,492

you can download the repo from: http://nexus.gluonhq.com/nexus/content/repositories/releases/com/gluonhq/charm-glisten/4.4.1/

If you add this as a library in your JavaFX application and reference it with an import in the FXMLDocumentController:

import com.gluonhq.charm.glisten.control.ProgressBar; 
import com.gluonhq.charm.glisten.control.ProgressIndicator;
import com.gluonhq.charm.glisten.control.TextField;   

And ofcourse the link to the FXML file:

@FXML
private ProgressIndicator progress;
@FXML
private ProgressBar progressbar;
@FXML
private TextField textfield;

in the FXML file:

<?import com.gluonhq.charm.glisten.control.ProgressBar?>
<?import com.gluonhq.charm.glisten.control.ProgressIndicator?>
<?import com.gluonhq.charm.glisten.control.TextField?>

and do not forget to set the fx:id:

<ProgressIndicator fx:id="progress" layoutX="85.0" layoutY="14.0" opacity="0.75" prefHeight="132.0" prefWidth="137.0" progress="0.25" radius="75.0" />
<ProgressBar fx:id="progressbar" layoutX="16.0" layoutY="177.0" opacity="0.75" prefHeight="18.0" prefWidth="288.0" progress="0.75" />
<TextField fx:id="textfield" layoutX="118.0" layoutY="80.0" prefHeight="27.0" prefWidth="92.0" />

It should work (works fine with me =^)

see for more info:

http://docs.gluonhq.com/charm/javadoc/4.3.5/index.html?com/gluonhq/charm/glisten/control/TextField.html

Share:
14,492
Isuru
Author by

Isuru

Android App Developer with Java.

Updated on June 29, 2022

Comments

  • Isuru
    Isuru almost 2 years

    I'm using scene builder to create an user interface which uses com.gluonhq.charm.glisten.control.TextField. It works properly in the Scene Builder and it's preview.

    enter image description here

    But in the NetBeans editor I get the class does not exist error.

    enter image description here

    When I try to run the application, I get the following runtime error.

    Caused by: java.lang.ClassNotFoundException: com.gluonhq.charm.glisten.control.TextField
        at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
        at javafx.fxml.FXMLLoader.loadTypeForPackage(FXMLLoader.java:2916)
        at javafx.fxml.FXMLLoader.loadType(FXMLLoader.java:2905)
        at javafx.fxml.FXMLLoader.importClass(FXMLLoader.java:2846)
        ... 60 more
    

    I used the Library manager in Scene Builder to install com.gluonhq:charm repository. But I still get those errors. Any suggestion will be highly appreciated.