scenebuilder

Use SceneBuilder with JavaFX 11 in IDEA

青春壹個敷衍的年華 提交于 2019-12-06 16:21:19
I am using IDEA (with OpenJDK 11), and I am trying to use the SceneBuilder to display my FXML files. It works, except when I use inherited JavaFX components, for example : public class MyLabel extends Label { public MyLabel(){ super(); setText("42"); } } I always get an error : java.lang.UnsupportedClassVersionError: sample/MyLabel has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0 So I looked in my IDEA installation folder (C:\Users\me\AppData\Local\JetBrains\Toolbox\apps

Display two windows at the same time using JavaFX Scene Builder 2.0

霸气de小男生 提交于 2019-12-06 06:35:50
I'm working on a mini application where I need to display to users 2 windows at the same time. I'm working with JavaFx Scene Builder 2.0 on NetBeans 8.0.1 is it possible to do this? if so, how it can be done ? Thank you! By "screen" I assume you mean "window". Just create a second stage in your start() method and do exactly the same with it as you do your primary stage: public class MyApp extends Application { @Override public void start(Stage primaryStage) { Stage anotherStage = new Stage(); try { FXMLLoader loader = new FXMLLoader(...); // FXML for primary stage Parent root = loader.load();

remove default focus from TextField JavaFX

老子叫甜甜 提交于 2019-12-06 03:02:31
问题 I have designed some TextField in a form by SceneBuilder, when I run the code, one of the TextFields has been clicked by default, I want when I run the code, none of the TextFields get selected by default and user select a TextFiled. UPDATE: As you see in this image I want to make the first field like other two field when code runs(no curser in field) How can I do this? 回答1: As there is no public method to achieve this, there is no direct way. Though, you can use a trick to do it. You can

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

£可爱£侵袭症+ 提交于 2019-12-05 20:19:19
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. But in the NetBeans editor I get the class does not exist error. 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

How can I align items of Toolbar to the right in JavaFX [duplicate]

亡梦爱人 提交于 2019-12-05 20:13:52
This question already has answers here : How to right align a button in Java FX toolbar (3 answers) Closed 2 years ago . How can I align the items of a toolbar to the right?? All alignment settings seem to not work. I´m using the layout designer. Please help <BorderPane fx:controller="vmanager.ui.Controller" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1"> <top> <ToolBar prefWidth="200.0" BorderPane.alignment="CENTER_RIGHT"> <items> <Button alignment

Refill a SVG Path with onMouseEntered event in JavaFX

寵の児 提交于 2019-12-04 22:41:19
i'm working on a personal project which includes a .fxml document(created from a .svg file with NetBeans). Here is the Map as you can see.Moreover, all the regions are converted into a SVG Path in .fxml file. The thing is i can handle with mouse events with using JavaFX Scene Builder with a controller class however, i want to refill (or in other words repaint or highlight ) the region whenever mouse is entered on it. Here is main class public class JavaFXApplication1 extends Application { @Override public void start(Stage primaryStage) throws IOException { Parent root = FXMLLoader.load

remove default focus from TextField JavaFX

不想你离开。 提交于 2019-12-04 08:20:50
I have designed some TextField in a form by SceneBuilder, when I run the code, one of the TextFields has been clicked by default, I want when I run the code, none of the TextFields get selected by default and user select a TextFiled. UPDATE: As you see in this image I want to make the first field like other two field when code runs(no curser in field) How can I do this? As there is no public method to achieve this, there is no direct way. Though, you can use a trick to do it. You can have a BooleanProperty just to check when the control is focused for the first time. Listen to focusProperty()

JavaFX Treeview shows no items

依然范特西╮ 提交于 2019-12-04 06:32:43
问题 I try to implement an TreeView in my JavaFX App. But unfortenatly no items are showed, but i cannot find an issue. I search for some example and did it like them. I put an TreeView Control to my FXML File in SceneBuilder and selected the ControllerClass which was generated and slected the Treeview field from this class as an id for the TreeView Control in SceneBuilder. That's my Controller code: public class MainSceneController implements Initializable { @FXML TreeView<String> treeview; @FXML

JavaFX Circle and ImageView

℡╲_俬逩灬. 提交于 2019-12-04 02:15:48
问题 I need to use javaFX2 to do the following: 1-) Load an image and display it using imageView. [OK] 2-) Right click and choose the "Add Node" option and a black circle will appear in the screen and you can Drag the circle to any place of the image. [OK] 3-) Use the scroll wheel fo the mouse to scale up or down the imageView, giving the "Zoom Sensation" on the image. [OK] 3.1-) However, every time I scale the image I want my circles to follow the scale proportion, which means they cant stay in

Can't populate JavaFX TableView created in SceneBuilder 2

北战南征 提交于 2019-12-03 21:48:16
I am trying to re-create the table view sample using scene builder 2, but my TableView couldn’t be populated. I defined my table in JavaFx SceneBuilder like so: <?xml version="1.0" encoding="UTF-8"?> <?import java.lang.*?> <?import java.util.*?> <?import javafx.scene.*?> <?import javafx.scene.control.*?> <?import javafx.scene.layout.*?> <AnchorPane id="AnchorPane" prefHeight="380.0" prefWidth="462.0" xmlns:fx="http://javafx.com/fxml/1" xmlns="http://javafx.com/javafx/8" fx:controller="tableviewsample.FXMLDocumentController"> <children> <Button fx:id="button" layoutX="325.0" layoutY="324.0"