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

£可爱£侵袭症+ 提交于 2019-12-05 20:19:19

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

This TextField is a product of Gluon which needs the external library. It will cause such exceptions, if you do not intend to use.

The control below is builtin TextField.

head over to GluonHQ and download charm.glisten....jar and import it in your libraries of the Javafx package in netbeans.. it worked for me

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!