scenebuilder

JavaFX SceneBuilder 2.0 doesn't open FXML for custom components with fx:root as main layout tag

蓝咒 提交于 2019-12-01 02:55:56
问题 I have custom component with layout on FXML file which containts line <fx:root type="javafx.scene.layout.VBox" spacing="10.0" xmlns:fx="http://javafx.com/fxml"> I create this file on SceneBuilder 1.0, but then i try open this file on SceneBuilder 2.0 i got Exception java.io.IOException: javafx.fxml.LoadException: Root hasn't been set. Use method setRoot() before load. /Users/dmitrynelepov/Development/SogazGit/smpb/SMProjectBrownRelease/SMPBProxy/engine/fxml/component_daemon_viewer.fxml:14

Javafx 2.0 : How to change the size of the radio-buttons circle with CSS?

﹥>﹥吖頭↗ 提交于 2019-12-01 02:25:47
问题 I try to change the radio-buttons size in my app build with FXML and CSS. I use the sceneBuilder. Thanks for your help ! Here is my actual CSS code for the radio-buttons : .radio-button .radio{ -fx-border-width : 1px ; -fx-border-color : #000 ; -fx-background-color : white ; -fx-background-image : null ; -fx-border-radius : 15px ; -fx-height : 15px ; /* Not working */ height : 5px ; /* Not working */ } .radio-button .radio:selected{ -fx-background-color : white ; -fx-background-image : null ;

Setting a class Controller for Anchor Pane

[亡魂溺海] 提交于 2019-11-30 21:20:14
When working with JavaFX Scene Builder encountered the following problem... Given: A file fxml, containing description Anchor Pane (fxml formed from Scene Builder); For Anchor Pane is not specified Controller Class. This fxml loaded into the Java Application by using FXMLLoader. Need: After downloading the Anchor Pane set the value to Controller Class. It is necessary for to load the same fxml with different handlers. Question: is it possible, and if so - how to implement? The controller class of the loading FXML file can also be set through the Scene Builder. But you want to set it at loading

JavaFX custom control (TextField) not working

十年热恋 提交于 2019-11-30 12:44:55
I am trying to make a custom control with JavaFX and SceneBuilder 1.1. I have this code: FXML <?import libreria.javaFX.componentes.componenteTextField.*?> <AnchorPane id="AnchorPane" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" xmlns:fx="http://javafx.com/fxml"> <children> <CustomComponent fx:id="pastaTxt" layoutX="69.0" layoutY="87.0" prefWidth="200.0" /> </children> </AnchorPane> CustomComponent.java package libreria.javaFX.componentes.componenteTextField; import javafx.scene.control.TextField; public class

How to use FXMLLoader.load() - JavaFX 2

老子叫甜甜 提交于 2019-11-30 08:28:42
问题 I am building a JavaFX application using the JavaFX Scene Builder. The interface was created in the Scene Builder and a FXML file (main.fxml) was created. To use the interface in my application I must load the FXML file using the FXMLLoader, but there is a problem because the load() method returns an Object, and to build a Scene I need an instance of Parent class. Below is a piece of my MainClass. The compiler is giving an error because page is not of type Parent: Object page = FXMLLoader

How do I get rid of the border around a split pane in JavaFX?

我是研究僧i 提交于 2019-11-30 08:27:15
问题 I'm using the JavaFX SceneBuilder, but I'll paste the FXML below since it's short. I have a very simple window with a split pane inside an anchor pane. Here is the FXML: <?xml version="1.0" encoding="UTF-8"?> <AnchorPane id="AnchorPane" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" xmlns:fx="http://javafx.com/fxml"> <children> <SplitPane id="main-split-pane" dividerPositions="0.25" focusTraversable="true" maxHeight=

table column won't take full size of the table view in javaFX

做~自己de王妃 提交于 2019-11-30 06:11:48
i am trying to create a table with two columns. i am using the scene builder included in netbeans 7.2. in all the examples i have seen all you need to do is drag the table column to the table and it will take the full size, this is not true in my case. this is the fxml file generated by the scene builder. just to be clear i am not changing the table properties from the java. the fxml: <?xml version="1.0" encoding="UTF-8"?> <?import java.lang.*?> <?import java.net.*?> <?import java.util.*?> <?import javafx.geometry.*?> <?import javafx.scene.*?> <?import javafx.scene.control.*?> <?import javafx

JavaFX2 - very poor performance when adding custom made (fxml)panels to gridpane dynamically

被刻印的时光 ゝ 提交于 2019-11-30 02:21:46
Problem I want to add custom made panels, built via javafx scene builder, to a gridpane at runtime. My custom made panel exsits of buttons, labels and so on. My Attempt I tried to extend from pane... public class Celli extends Pane{ public Celli() throws IOException{ Parent root = FXMLLoader.load(getClass().getResource("Cell.fxml")); this.getChildren().add(root); } } ... and then use this panel in the adding method of the conroller @FXML private void textChange(KeyEvent event) { GridPane g = new GridPane(); for (int i=0 : i<100; i++){ g.getChildren().add(new Celli()); } } } It works, but it

JavaFX custom control (TextField) not working

混江龙づ霸主 提交于 2019-11-29 18:28:30
问题 I am trying to make a custom control with JavaFX and SceneBuilder 1.1. I have this code: FXML <?import libreria.javaFX.componentes.componenteTextField.*?> <AnchorPane id="AnchorPane" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" xmlns:fx="http://javafx.com/fxml"> <children> <CustomComponent fx:id="pastaTxt" layoutX="69.0" layoutY="87.0" prefWidth="200.0" /> </children> </AnchorPane> CustomComponent.java package

Text color on JavaFX ComboBox items change only after first selection

我与影子孤独终老i 提交于 2019-11-29 16:18:57
I am building an input form in JavaFx from Java 8.0 using SceneBuilder 2.0 on Windows 7 in e(fx)clipse. I have a simple String ComboBox, and want to change the color and size of the fonts in both the list and the selected String. The css code I use changes the text on the selected item. However, the first time one drops the list, it is in black default font. The second time, the font color and size on all items have changed to the correct values. How do I make the font list start up in the right color and size? Here is simplified code from the initialize method in my Controller class: