Hi - brand new to JavaFAX, and for that matter, to Java period.
I started out building a Swing GUI, and almost had my head around that when I learned that JavaFX was the "future". So, I switched to trying to learn and use that and have been quite frustrated. Most of the examples I find and copy/paste into my editor don't work - error all over the place. I think a lot of that is because the people writing the samples/example never bother to talk about context or required imports, etc.
Even if I get the imports sorted out, I still get a lot of errors, and I THINK maybe I'm beginning to understand why, but want to verify this. It seems that the JavaFX forms (scenes? stages? windows? whatever they're called) created by FXML/Scene builder, don't want to work except in the context of a JavaFX "Application" - that is, a class that extends "Application". Is this correct? In addition, I can't get it to work except within (or called from) the "start" method. Is that right?
If so, that means there is no way to simply do a quick alert dialog w/o it all being wrapped up in this stuff? This seems awfully clunky IMO. Can I mix FX with the Swing stuff? All in the world I want to do is have a simple dialog box come up with Ok/Cancel buttons. In many/most other languages, this is as simple as something like:
which can be called from anywhere , anytime. Does Java have something like that? Please advise. THANKS!
I started out building a Swing GUI, and almost had my head around that when I learned that JavaFX was the "future". So, I switched to trying to learn and use that and have been quite frustrated. Most of the examples I find and copy/paste into my editor don't work - error all over the place. I think a lot of that is because the people writing the samples/example never bother to talk about context or required imports, etc.
Even if I get the imports sorted out, I still get a lot of errors, and I THINK maybe I'm beginning to understand why, but want to verify this. It seems that the JavaFX forms (scenes? stages? windows? whatever they're called) created by FXML/Scene builder, don't want to work except in the context of a JavaFX "Application" - that is, a class that extends "Application". Is this correct? In addition, I can't get it to work except within (or called from) the "start" method. Is that right?
If so, that means there is no way to simply do a quick alert dialog w/o it all being wrapped up in this stuff? This seems awfully clunky IMO. Can I mix FX with the Swing stuff? All in the world I want to do is have a simple dialog box come up with Ok/Cancel buttons. In many/most other languages, this is as simple as something like:
which can be called from anywhere , anytime. Does Java have something like that? Please advise. THANKS!