javafx

Detect mouse click on SELECTION Editable ComboBox JavaFX

Deadly 提交于 2021-02-08 07:32:45
问题 The question may seem pretty easy at first, but I've already had troubles with it for a few days. So, my problem is that I would like to detect mouse click AND the selection when the ComboBox selection is open and the mouse click is made to choose the option. So, what it should do is detect the MOUSE CLICK on the selection and also get the selected value as well: PS: The code for my ComboBox can be seen here: Select JavaFX Editable Combobox text on click Feel free to ask additional questions.

Use 2D Text into 3D scenes in JavaFX results in blurry texts

浪尽此生 提交于 2021-02-08 06:34:50
问题 I'm trying to display various Text objects inside a 3D scene The problem is that when i zoom close to the text it looks very blurry. Here's a screenshot from my app Question: how can i improve the graphic quality of the text on the screen? I've tried setting cache as in JavaFX 2D text with background in 3D scene because it seemed to improve graphics quality on the answer screenshots but it did not help me in my case. Below is a compileable example stripped down form my app. It just create

How to fix “Unable to derive module descriptor for .jar file” error in fxml

落花浮王杯 提交于 2021-02-08 05:27:14
问题 I would like to get an image from JAR library to my project. <graphic> <ImageView> <Image url="@/toolbarButtonGraphics/general/TipOfTheDay24.gif"/> </ImageView> </graphic> I've added the library to my module and it seemed to be correct but the compiler throws an error: Error occurred during initialization of boot layer java.lang.module.FindException: Unable to derive module descriptor for filepath.jar Caused by: java.lang.IllegalArgumentException: jlfgr.1.0: Invalid module name: '1' is not a

Java fx editable combobox with objects

寵の児 提交于 2021-02-07 20:50:31
问题 I am just starting to learn Java Fx. I have a combo box filled with objects. I dealt with toString() method, and I can see that name I wanted to display on the screen. But now I would like to make it editable, that user will enter its own text, and ComboBox will create a new object and put that text into the correct field. I know that problem is in converter FromString or ToString, but I cannot deal with it. package mnet; import javafx.application.Application; import javafx.scene.control

Java fx editable combobox with objects

泪湿孤枕 提交于 2021-02-07 20:46:29
问题 I am just starting to learn Java Fx. I have a combo box filled with objects. I dealt with toString() method, and I can see that name I wanted to display on the screen. But now I would like to make it editable, that user will enter its own text, and ComboBox will create a new object and put that text into the correct field. I know that problem is in converter FromString or ToString, but I cannot deal with it. package mnet; import javafx.application.Application; import javafx.scene.control

How to properly execute Thread.sleep() in javaFX? [duplicate]

烂漫一生 提交于 2021-02-07 20:12:50
问题 This question already has answers here : JavaFX periodic background task (5 answers) Closed 2 years ago . I am writing a simple code that displays the content of a table with javaFX. I would like the program to pause every time a new content is displayed. for(int i = 0; i < table.size(); i++){ label.setText(table[i]); Thread.sleep(2000); // The program stops for 2 seconds } The problem is, Thread.sleep() doesn't work as planed. In fact, the program pauses before even displaying the content.

How to properly execute Thread.sleep() in javaFX? [duplicate]

六眼飞鱼酱① 提交于 2021-02-07 20:02:10
问题 This question already has answers here : JavaFX periodic background task (5 answers) Closed 2 years ago . I am writing a simple code that displays the content of a table with javaFX. I would like the program to pause every time a new content is displayed. for(int i = 0; i < table.size(); i++){ label.setText(table[i]); Thread.sleep(2000); // The program stops for 2 seconds } The problem is, Thread.sleep() doesn't work as planed. In fact, the program pauses before even displaying the content.

Editing large text files with JavaFX using TextArea

不羁岁月 提交于 2021-02-07 19:47:57
问题 Is there a way to make editing a relatively large text file (ex. 10-25 MB) in a TextArea reasonably fast? Or maybe there are features that can be disabled to make it faster? Is there an alternative component? (I know about RichTextFX, but I imagine it'd be slower since it does more, and I only need a basic editor.) I'd rather not break the source text up into smaller parts and only load a portion of the text, since that would break text selection+copy (ie. "select all" would only be selecting

Editing large text files with JavaFX using TextArea

送分小仙女□ 提交于 2021-02-07 19:47:34
问题 Is there a way to make editing a relatively large text file (ex. 10-25 MB) in a TextArea reasonably fast? Or maybe there are features that can be disabled to make it faster? Is there an alternative component? (I know about RichTextFX, but I imagine it'd be slower since it does more, and I only need a basic editor.) I'd rather not break the source text up into smaller parts and only load a portion of the text, since that would break text selection+copy (ie. "select all" would only be selecting

JavaFX: Redirect console output to TextArea that is created in SceneBuilder

為{幸葍}努か 提交于 2021-02-07 19:22:10
问题 EDIT 4 I've created a simple example that should give you an idea about what's happening right now. What's happening right now is that whenever I click the button to print "HELLO WORLD" to the TextArea, the program will hang and use 100% of the CPU. There's also no output in the Eclipse console panel too. Main.java public class Main extends Application { @Override public void start(Stage primaryStage) { try { Parent root = FXMLLoader.load(getClass().getResource("/application/test.fxml"));