scenebuilder

Intellij IDEA JavaFX Scene Builder different resolution to the rest of the application

人走茶凉 提交于 2020-01-16 19:52:11
问题 I have this issue with the JavaFX Scene Builder. It works as intended but the resolution seems to be lower than the rest of the application. Intellij IDEA did update recently to the 2018 version and thats when the issue started. I have tried downgrading to the previous version but the issue is still there. Is there a way that I can revert the settings for Scene Builder or is there a setting that I have missed? Can't find anything about it online. TIA 回答1: It's a known issue. Current

Change JavaFX Tab-Button orderring of TextFields from “Left to Right” to “Right to Left” by fxml file [duplicate]

[亡魂溺海] 提交于 2020-01-16 18:34:09
问题 This question already has answers here : JavaFX: How to change the focus traversal policy? (9 answers) Closed 4 years ago . Before asking, i should say that the answer of can be found maybe in JavaFX: How to change the focus traversal policy?, but i don't looking for any java code, i would like a way by editing the Fxml file There is a FXML file that has some TextFields in it and i would like to change focus traversal policy of my TextField : I mean, At the beginning of the application the

@FXML public static vars in javafx? [duplicate]

牧云@^-^@ 提交于 2020-01-16 08:04:33
问题 This question already has an answer here : javafx 8 compatibility issues - FXML static fields (1 answer) Closed 5 years ago . I'm introducing in javafx and i found it very interesting. But I have got a problem that i can't solve. In the simplest case of a Hello World I can't put a @FXML public static var like this: public class FXMLDocumentController implements Initializable { @FXML public static Label label; @FXML private void handleButtonAction(ActionEvent event) { System.out.println("You

How to serialize JavaFX Nodes preferably in XML?

扶醉桌前 提交于 2020-01-15 09:47:11
问题 I have some kind of drawpane, where the user can draw different kinds of Shapes, like Pathes, Rectangles, Texts, etc. Now I´d like to persist the DrawState, so that I can recreate it at any time. I just tried it with xstream, but like usual I get a whole lot of dependencies within these Shapes when persisting it in XML. After some research I found this Thread here: Serialize JavaFX components I liked the idea of jewelsea using the SceneBuilder API to serialize my shapes, since they are all

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

两盒软妹~` 提交于 2020-01-13 13:45:32
问题 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

SceneBuilder Tooltip over Label JavaFX

夙愿已清 提交于 2020-01-13 09:07:26
问题 If I have a label with a text that's too long and I want a tooltip that shows the entire label text when I hover over the label with my mouse. Is that possible to do in SceneBuilder or do I have to do it programically for all my labels? 回答1: Under "Miscellaneous" in the Library pane (left side), you will find a "Tooltip". Just drag it and drop it onto the label in the Hierarchy pane below. Then you can select the tooltip and configure the text, etc. 来源: https://stackoverflow.com/questions

How to trigger an event on focus out for a textfield in javafx using fxml?

风流意气都作罢 提交于 2020-01-11 11:56:11
问题 I have this function in the controller class of the relevant fxml. I need this function to be fired on focus out from a textfield, but scene builder doesn't have an event similar to onfocusout. How to achieve this using the control class? @FXML private void ValidateBikeNo(){ Tooltip error = new Tooltip("This bike no exists"); BikeNoIn.setTooltip(error); } 回答1: You can attach a focusListener to the TextField and then execute the code inside it. The listener can be attached inside the

How to add SceneBuilder to Intellij after mistakenly adding the SceneBuilder's shortcut link

夙愿已清 提交于 2020-01-11 06:21:14
问题 So I installed Intellij for the first time and I mistakenly linked SceneBuilder's shortcut link to the FXML file and keep getting this error: IntelliJ failed to start scene builder . After doing a lot of searching, I could not find out how to reset SceneBuilder. How do I reset SceneBuilder in IntelliJ? 回答1: Go to Settings > Languages & Frameworks > JavaFX > Path to SceneBuilder and select directory of JavaFX Scene Builder 2.0.exe 回答2: I had to follow this instruction to find the files I

KeyListener JavaFX

爱⌒轻易说出口 提交于 2020-01-10 15:40:13
问题 I was looking on the internet but I didn't find good information for it. I'm trying to detect key presses every time the app is running. I'm using JavaFX and running it with FXML. I tryed a lot of thing but none work. Please help me. 回答1: You should check out the Ensemble sample. Here's the key listener code. /** * Copyright (c) 2008, 2012 Oracle and/or its affiliates. * All rights reserved. Use is subject to license terms. */ import javafx.application.Application; import javafx.scene.Group;

JavaFX+MVC. How to hide/show multiple windows?

て烟熏妆下的殇ゞ 提交于 2020-01-06 02:00:07
问题 How to make that when i click on "Open second window" the main window be hide. And when i close second window, the main window be showed? I read this post, but i don't know how to implement it for my task. Thanks! I have next code: Main.java public class Main extends Application { @Override public void start(Stage primaryStage) { primaryStage.setTitle("First Stage"); try { primaryStage.setResizable(false); Parent root = FXMLLoader.load(getClass().getResource("MainView.fxml")); Scene scene =