Questions tagged as 'javafx'

2
answers

Get ScrollPane size when set by anchor - JavaFX

I have a ScrollPane anchored on the 4 sides of an AnchorPane so that when I resize the screen, the scroll also resizes. So I do not need to specify a fixed size. That's how it works. The problem is that in this way the methods getPrefWidth...
asked by 20.07.2018 / 03:14
1
answer

Focus event in fxml

In the fxml file of a GUI we can direct the code to a method when a particular event occurs. For action events, it would be something like this: <Button fx:id="btn1" onAction="#actionPause" /> But as to whether the object has been foc...
asked by 18.07.2017 / 06:54
1
answer

How to capture the closing event on a Stage?

I'm looking for an "windows close" Swing event.     
asked by 09.11.2017 / 21:28
1
answer

Pass an object between scenes (screens) JavaFx

The idea of the system is to save some information in a txt file that will be queried by a code in Lisp, a decision tree routine will be performed and will return the result to be displayed in the interface in Java. I have an object that will...
asked by 02.11.2017 / 01:57
1
answer

Save frames / images of a video

Hello, I need to save images / frames of a video. The idea is to create a movie preview before it starts. The problem is that I'm not able to implement the examples I found. 1st Example to take a screenshot of the component with JavaFX,...
asked by 30.11.2017 / 15:54
1
answer

JavaFX: pros and cons of MVC, MVP, MVVM, etc.

What standard model-vision (MV) use with JavaFX thinking about scalability and good manutibility? On Google you find people recommending MVC, MVP , MVVM ... maybe there are others. Some say JavaFX is meant to be used with MVC . Others...
asked by 01.06.2018 / 19:06
1
answer

Return to the Start Menu when pressing ESC with JavaFx

How can I get my application back to the start menu after pressing ESC . Currently I can use KeyEvent only when some component is associated, such as TextField , Button , etc. I just want to press Esc without any component bein...
asked by 24.06.2015 / 16:05
2
answers

How to create a timer in JavaFX using scene builder?

Galera, I've been struggling for some months because of not getting a label to keep updating constantly. I can do a timer, but when it comes to the interface created by scene builder , it hangs because I could not update the label...
asked by 10.01.2017 / 15:22
0
answers

Maxlength in TextField

I have a Textfield in javaFX, but I can not find the Maxlength property. In C # and QT5, I've done some apps, and it's very simple to find this property. I've found some answers, though I'm in doubt whether I really need to do this "at hand"...
asked by 08.06.2017 / 14:19
1
answer

Optical illusion parallel lines

I have the following exercise that asks me to draw an optical illusion like the following: But I can not find a simple way to make the code so that it makes this progression in which it goes one square forward then some back. Now I have th...
asked by 27.12.2017 / 20:20