![]() |
|
[Java] JavaFX GUI - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444) +--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151) +---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118) +---- Thread: [Java] JavaFX GUI (/showthread.php?tid=5875994) |
JavaFX GUI - Consulting Detective - Aug 20, 2018 Quick question, when creating javafx GUIs, do you guys prefer fxml or raw java code? I only started learning it, and I seem to favor just the java code. Though I know using fxml can segregate software functionality and software gui. Maybe the only reason l don't like fxml is because I'm unfamiliar with it, I have never dealt with xml before. But I heard before that it has something to do with web development. I really need to google it lol. What do you guys think? P.S code below is my first javaFX app. So no hate :) PHP Code RE: JavaFX GUI - Dostoevsky - Aug 20, 2018 I mean, you're saying you prefer writing out UIs by hand after writing your first JavaFX application that consists of a label and a button component grouped into a flow-layout. You should play more with scene builder, saves a lot of time for most things. People often forget that you can create custom components and import them into scene builder to use your own components in a WYSIWIG manner (which is convenient). Generally I find it best to make UIs rather modular so I can modify the UI using scene builder but utilise the custom component dynamically. E.g. populate a scroll pane with lots of custom components for displaying information about something. Some would call me unconventional for generally favouring Java Swing over JavaFX in most instances though (I just did it for a long time before JavaFX was even a thing and seldom see the point in using JavaFX - or Java, nowadays, for that matter). RE: JavaFX GUI - HFDone - Aug 20, 2018 😉 use javax.swing PHP Code RE: JavaFX GUI - GenericSkid - Aug 21, 2018 I too create my UI's through code. I tried using the WYSIWYG editor but I gave up half way though because I knew what I wanted and could make it in code faster than it would take me to learn the WYSIWYG editor. (Aug 20, 2018 04:21 AM)Dostoevsky Wrote: Some would call me unconventional for generally favouring Java Swing over JavaFX in most instances though Its understandable though. Swing has been around for much longer and has been bundled with the JRE for a long time. JFX is being removed in future releases so you'll have to bundle it as a dependency yourself. Sucks for people like me with shitty internet speeds. RE: JavaFX GUI - +Haze - Aug 29, 2018 It's always best to GUI builders like the scene builder unless you need to create controls dynamically. |