#I need help with javafx intellj macos
326 messages ยท Page 1 of 1 (latest)
โ This post has been reserved for your question.
Hey @sonic moth! Please use
/closeor theClose Postbutton above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically marked as dormant after 300 minutes of inactivity.
TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.
Are you using IntelliJ Community or Ultimate Edition?
idk?
I think you can use the Maven Archetype option and select "maven-archetype-quickstar (or maven-archetype-fxml) from org.openjfx
?
I think the option is only available in the paid version
but that should still work in the free one
wait why use maven isntead of wtv im trying to use
On the left side of your first screenshot, there's a Maven archetype option
Maven is one of the build tools you can use for JavaFX projects
and I would recommend using Maven for JavaFX either way.
and Maven archetypes are basically project tenplates
is there a difference?
difference between what exactly?
uHm
huh??
i got javafx?
it spawned out of no where
i was following some yt video from 2 months ago rn about javafx intellj, but decided to listen to u, so i just reset all the settings back to default
and reopened intellj
and ts poppedup
that looks like IntelliJ Ultimate (the paid version of IntelliJ)
i didnt pay nothing gng
maybe they also changed their licensing or whatever
In the past, at least most of these pptions were exclusive to the paid version
or maybe you activated the free trial
i was following some yt video on how to do the javafx templetate but they got to a stage where i couldnt continue witht hem cuz some file type named fxml or something like that wasnt on my screen, so i reset setting
and it popped up
doesnt that require me to enter payment details?
also do i go with javafx then?
no but it only works for a limited amount of time AFAIK
hm
You can
how can i check if i got free trial on
If it uses Maven, that's perfectly fine
Honestly, I don't know
lol
but if it's a normal Maven project, it will still work with the free version
I don't even use IntelliJ
whats difference between the javafx intellj and the maven 1
what u use
IntelliJ is the IDE i.e. the program you are screenshotting
the thing you write the code in
JavaFX is a UI framework. It adds additional classes that allow building Java applications with GUIs
Maven is a build tool. It allows specifying what libraries (e.g. JavaFX) you are using, where everything is located and a lot of other things. Maven would essentially manage the (Java) project and build it for you.
I personally use Eclipse instead of IntelliJ
should i use it might aswell?
you can use whatever you prefer
whats the difference tho beteeen mavan and javafx im confused still icel
is there a difference?
Those tools are solving different problems
JavaFX is for building GUIs.
Macen handles (building) Java projects and dependencies.
so in mavan i can get javafx to build guis or wat
There are various differences but both Eclipse and IntelliJ are doing similar things
Yes, you can use Maven for JavaFX projects
in ur opinion do i downlaoded eclipse and get javafx on there and life is fun and ez ig lol?
You can also use Gradle (an alternative to Maven) for JavaFX
Both work well. I prefer Eclipse but that doesn't mean it's better for you. It's a matter of your preference.
ok eclipse it is ๐ญ
The Maven setup for JavaFX should be pretty much the same with both Eclipse and IntelliJ
can i get javafx on eclipse?
You can create a Maven project using one of the JavaFX archetypes
You don't really need a plugin for it (at least not with Maven) but there is one available.
ok basically why i am doing javafx for gui cuz im 1st yr cs student
wanting to get an internship this summer
so i am trying to learn java ahead of uni, like faster than uni
to create projects for cv
so ofc i gotta start small, i did a tictactoe game in the console ui of
uh
vscode
now i wanna go into make gui
to make it in a gui
so then i can expand and make other things with the gui yk?
That's perfectly fine but note that JavaFX is a library that gets complex pretty quickly
ok ty
here i will ddownload eclipse
Java GUI tutorial for beginners fx graphics
#Java #GUI #tutorial #beginners
โญ๏ธTime Stampsโญ๏ธ
(00:00:00) intro โ
(00:00:33) install & setup (Eclipse) ๐
(00:08:14) install & setup (IntelliJ) ๐ก
(00:12:40) Stages ๐ญ
(00:25:47) Scenes + drawing stuff ๐
(00:40:22) install Scene Builder ๐ ๏ธ
(00:49:53) event handling using Scen...
im watchin ts serious
series*
is this fine
damn
eclipse is a bit weird icel
like so many gra white colours
looks old
probably
There's also a dark theme if you really want to use that
no mac
ok
here i will test both ide's and see
i got both open
in intellj
i made new project iwht maven
and for eclipse
uh what to do here
Did you select the archetype option in IntelliJ?
press next
there's a "Maven Archetype" section on the left
i see
i dont think that was there before whateer gave me all these options
but i will use it anyhow
nvm it was
That's where you select the archetype to use. Is there a "javafx-archetype-simple" option?
you can use the filter/search
nope there is not
or openjfx-archetype-simple
that isn't necessary with Maven
ok tho it is not there
there should be an "org.openjdk:javafx-archetype-sinple"
bit you might need to change the catalog to Maven Central or similar
in the dropdown at the top
They have been merged now btw. https://blog.jetbrains.com/idea/2025/12/intellij-idea-unified-release/
so wait, javafx and all the things is free?
yeah ik but one is still effectively using one or the other depending on whether they have a licence or not
@severe sky like ts is for everyone not free trail?
JavaFX was always free.
JavaFX is free, yes. But the dedicated IntelliJ support for it might not be.
i meant like being in the side bar to choose
here dan1st
you'd select one of the ones with "org.openjfx" on the left side as these are official
anyone of them?
Do you want to use FXML/scene builder?
Do you want to use Scene builder?
idk what that is i just started lol
I guess just atart with the -simple one
cuz im just tryina elarn guis
Scene builder gives you a GUI for designing GUIs that can more or less be loaded with JavaFX
what?
Now you can enter a group and artifact id.
The artifact ID is more or less the project name
the group id should basically identify you
or whoever owns the project
normally you would use reverse domain name notation for the group id (or something like io.github.yourgithubusername) but just using your username is probably fine fir now as well
for the group id
just don't include any weird characters or spaces
ok
i dont get it lol but i will just right deendefined ig
anything else or that page
like properaties or wtv
you can change the JavaFX version in the properties to 25 or similar if you want to
but you don't have to
then you can click on finish
i did
this was the last thing it gave
package: deendefined.Testing
but nothing oepned
Can you show a screenshot?
in the console, you need to confirm it by typing Y
If you want to change what Eclipse looks like, you can do that in Window > Preferences > General > Appearance
uuhm
ok apparently there is no Window > Preferences on macOS
if you press Cmd+3, something should pop up
there, you can enter "Appearence"
or "Color"
HUH
its already dark
why is it gray not black then
that dark gray is the dark theme
It is possible to add custom colors for people that really want to customize it though
yikes so i cant black
okay let me setup the other IDE
sry for taking so long btw
ty for ur help
whats after this
set catalog to a different option (maybe Maven Central)
and select the javafx-archetype-simple (the same one as before)
simple for now?
yes
there's also the darkest dark theme as an alternative but that's a third party plugin that broke things in the past
javafx vers 25?
yes
also the default jdk it gave?
probably
ok now what
Screenshot?
That should be a working JavaFX project (the same that you also created with Eclipse)
ok i will now watch the tutorial above
where do i code
in what file
oh in src
nvm
im blind
the relevant files are in src/main/java, yes
public class App extends Application {
@Override
public void start(Stage stage) {
var javaVersion = SystemInfo.javaVersion();
var javafxVersion = SystemInfo.javafxVersion();
var label = new Label("Hello, JavaFX " + javafxVersion + ", running on Java " + javaVersion + ".");
var scene = new Scene(new StackPane(label), 640, 480);
stage.setScene(scene);
stage.show();
}
public static void main(String[] args) {
launch();
}
} ```
This message has been formatted automatically. You can disable this using /preferences.
confused why they used var
Because they decided to do it that way? Both options work
i mean isnt var old?
var is a bit of a different concept in Java than in JS
in terms of file structure
is a nonchangeable variable?
no
if you don't want it to be modifiable, you need final
e.g. final var
or final Scene scene = new Scene(...);
WARNING: A restricted method in java.lang.System has been called
WARNING: java.lang.System::load has been called by com.sun.glass.utils.NativeLibLoader in module javafx.graphics (jrt:/javafx.graphics)
WARNING: Use --enable-native-access=javafx.graphics to avoid a warning for callers in this module
WARNING: Restricted methods will be blocked in a future release unless native access is enabled
does this matter
not for now
in the vid he has difference code than i do
is that cuz of uh maven
they got a file
named application.css?
๐ค Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived.
If your question was not answered yet, feel free to re-open this post or create a new one.
In case your post is not getting any attention, you can try to use/help ping.
Warning: abusing this will result in moderative actions taken against you.
I don't know what code they started with (if you are using a different template/archetype, the code will be different).
JavaFX supports CSS
If you use the javafx-archetype-fxml archetype, I think you'd start out with some other things including a CSS file
๐ค Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived.
If your question was not answered yet, feel free to re-open this post or create a new one.
In case your post is not getting any attention, you can try to use/help ping.
Warning: abusing this will result in moderative actions taken against you.
Ok I see
I have a small question tho
Basically I am doing this gui stuff just to make half decent projects for cv
Cuz rn I am a 1sy yr cs student
And I want to ger an internship this summer
So ykwim?
I was told by someone this gui wont really benefit me and I should go and do some project using REST Api servers?
What do you think
rest api sounds decent
tbh no point changing every second
ima just continue learning guis for now
and uh
do some projects
then do smth els
ykwim
yikwum
lol
You should do projects that motivate you. If GUIs are interesting for you, do that.
But JavaFX is a pretty complicated topic
Ok I after I finish this tic tac toe and calc project in gui
Any recommendations for proper projects
whatever is interesting to you
Create a road crossing game
yes
would yk why the url for imageview isnt working
ik i can just put path link
but i want to understand why it is not connecting
@severe sky
i was told to stop learning javafx scenebuilder
as its not sued anymore?
๐ค Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived.
If your question was not answered yet, feel free to re-open this post or create a new one.
In case your post is not getting any attention, you can try to use/help ping.
Warning: abusing this will result in moderative actions taken against you.
I never used JavaFX. No idea.
Regarding the not-found image are you sure it is located correctly? It should be directly in the working directory of your project to be found under this path.
- The image should be in src/main/resources or src/main/resources/testing
- Try
getClass().getResource("deen.png")for the first location orgetClass().getClassLoader().getResource("deen.png")for the second location
What makes you so sure about that?
I just heard about a company deciding to use JavaFX a few days ago. I don't know whether they use scene builder but I'd say it's pretty likely
I realised
Even if it is rarely used
It dont matter tbh
Because I am not looking for jobs im looking for an internship
So really any project is fine as along as the project it self is half decent
Correct me if im wrong
I made a resource and imsgd file dw
Idk what it didn't create by itself when I created the project
Okay also now I was following the guide and they went to dxml (scene builder) so I made a new projecr and I used javafx-fxml and I dow loaded scene builder and I linked it to my intellJ
Now when I continued the guide their code inside of the files that got auto created from creating the project is like completely different to mine
Same for their folder layout and file lay out
sounds good
No LOL
What i was saying is
My code is completely different same for mt folder and file layout then the toturoial
I'm confused cuz there is no way in 5 yrs it changed mt code and layout thar much
this is the turoials
this is mine
they said to go into the fxml file and i did its compeltely diffrent but when i went into the App file the code is like 70% similar?, and also why is the folder and file layout soo different?
It seems like the tutorial isn't using a Maven project
JavaFX projects without Maven are a big pain for anyone involved
All your Java classes go into src/main/java
All your other resource files (images, FXML files, etc) go into src/main/resources
and whether your package is called sample or testing doesn't really make a difference
i realised smth else
he is main
i thought he was in fxml lOL
idk why he said go to fxml
here is my main
i think i will delete my code
and copy his
so i can follow alone
cuz there isnt really anything i can do yk
no new tutorials online
You can still use the Maven project structure (with src/main/java etc) if you want to
so i just change everything to how he has it you mean
or continue my structure
I would personally keep the structure with src/main/java etc
and just change the code in app to his code
?
sure
๐ค Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived.
If your question was not answered yet, feel free to re-open this post or create a new one.
In case your post is not getting any attention, you can try to use/help ping.
Warning: abusing this will result in moderative actions taken against you.