I’m working on an JavaFX app and trying to follow Model-View-Controller pattern. I have implemented the Model with ordinary java objects(Double, Integer, String…) thinking I would re-use the model in non-JavaFX projects. However, I found it very difficult to make the View update automatically when the Model changes without properties. Before I change every variable into a property, I would
Tag: javafx
Javafx- how this multiple toggle buttons (in one group) actions are correctly configure for my need
This is what happens. But i need to return colors when i press other toggle buttons What I need to do is colors need to be back to blue after clicking on another button (while toggling another button need to untoggle toggled buttons) Problem is when I toggle 1st button (working correctly – changing color on box). But when I
How to restart a timer in JavaFX?
I’m currently working on a program in which users can create their on time intervals for different exercises. Once start is pressed, the countdown begins for the first exercise. Once it is done, a sound is played and countdown begins for the second one and so on until all the exercises are done and removed. I use a timer which
How to call a JAVA FX Class from another class many times
I want to rerun java FX application from another class. But error throws “Exception in thread “main” java.lang.IllegalStateException: Application launch must not be called more than once”. How to resolve this. In my code I do console part and FX part. I do the console part in a single class and FX part in another class. So I just want
JavaFX Maven Exception in Application start method
So I’ve been stuck with this problem for a few days now. I found and read a lot of posts here on stackoverflow and other sites, but none of the solutions worked for me. I have a problem with my JavaFX in my maven project. I use java 15 and JavaFX 15.0.1. Here are files that I have in my
Why does my combobox selectedItem doesnt work? [closed]
I don’t know why this line has an error String selected = idCombo.GetItemText(idCombo.SelectedItem); The compilation error is “SelectedItem cannot be resolved or is not a field”
Trying to create a scrolling background effect with imageViews in javafx
Im trying to create a scrolling background effect with two imageViews where one picture is on top of another picture and out of the window; then i try to scroll both down the window to create a scrolling effect by changing their y coordinates. I made a loop to do so and put a thread.sleep so it wouldnt do it
How can I assign a value to my GUI attributes from a custom object? [closed]
Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 2 years ago. Improve this question I am trying to make a game similar to bitlife, and in my program the first scene is the main menu where it asks the
How to get access computer’s calculator for a java project
I want to get access to the user’s computer’s calculator in my java project by clicking a button. If the method for that button is: public void btnCalculaterOnAction(ActionEvent actionEvent) throws …
How to install JavaFX on Windows 10 Eclipse?
I was trying some instructions I found on the internet, but they are too old to be of use now with the latest Eclipse IDE release. The code I am trying to run: Error: Unable to initialize main class javafxbasics.ShowFlowPane in module JavaFXproject Caused by: java.lang.NoClassDefFoundError: Stage Answer Finally found a video how to do that: How to Set Up