#I need help with javafx intellj macos

326 messages ยท Page 1 of 1 (latest)

sonic moth
#

I am confused i cant see javafx here

lyric coyoteBOT
#

โŒ› This post has been reserved for your question.

Hey @sonic moth! Please use /close or the Close Post button 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.

burnt wigeon
burnt wigeon
#

I think you can use the Maven Archetype option and select "maven-archetype-quickstar (or maven-archetype-fxml) from org.openjfx

sonic moth
#

?

burnt wigeon
burnt wigeon
sonic moth
#

wait why use maven isntead of wtv im trying to use

burnt wigeon
# sonic moth ?

On the left side of your first screenshot, there's a Maven archetype option

burnt wigeon
#

and I would recommend using Maven for JavaFX either way.

#

and Maven archetypes are basically project tenplates

sonic moth
#

is there a difference?

burnt wigeon
#

difference between what exactly?

sonic moth
#

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

burnt wigeon
# sonic moth

that looks like IntelliJ Ultimate (the paid version of IntelliJ)

sonic moth
#

i didnt pay nothing gng

burnt wigeon
#

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

sonic moth
#

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

sonic moth
#

also do i go with javafx then?

burnt wigeon
sonic moth
#

hm

burnt wigeon
sonic moth
#

how can i check if i got free trial on

burnt wigeon
#

If it uses Maven, that's perfectly fine

burnt wigeon
sonic moth
#

lol

burnt wigeon
#

but if it's a normal Maven project, it will still work with the free version

burnt wigeon
sonic moth
#

whats difference between the javafx intellj and the maven 1

sonic moth
burnt wigeon
#

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.

burnt wigeon
sonic moth
burnt wigeon
sonic moth
sonic moth
burnt wigeon
burnt wigeon
sonic moth
#

so in mavan i can get javafx to build guis or wat

burnt wigeon
burnt wigeon
sonic moth
#

in ur opinion do i downlaoded eclipse and get javafx on there and life is fun and ez ig lol?

burnt wigeon
#

You can also use Gradle (an alternative to Maven) for JavaFX

burnt wigeon
sonic moth
#

ok eclipse it is ๐Ÿ˜ญ

burnt wigeon
burnt wigeon
#

You can create a Maven project using one of the JavaFX archetypes

burnt wigeon
sonic moth
#

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?

burnt wigeon
#

That's perfectly fine but note that JavaFX is a library that gets complex pretty quickly

sonic moth
#

here i will ddownload eclipse

sonic moth
# burnt wigeon That's perfectly fine but note that JavaFX is a library that gets complex pretty...

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...

โ–ถ Play video
#

im watchin ts serious

#

series*

#

is this fine

sonic moth
#

eclipse is a bit weird icel

#

like so many gra white colours

#

looks old

burnt wigeon
burnt wigeon
burnt wigeon
#

if so, that's why

sonic moth
burnt wigeon
#

ok

sonic moth
#

i got both open

#

in intellj

#

i made new project iwht maven

#

and for eclipse

#

uh what to do here

burnt wigeon
burnt wigeon
burnt wigeon
sonic moth
sonic moth
#

i dont think that was there before whateer gave me all these options

#

but i will use it anyhow

#

nvm it was

burnt wigeon
# sonic moth

That's where you select the archetype to use. Is there a "javafx-archetype-simple" option?

burnt wigeon
sonic moth
#

nope there is not

sonic moth
#

no

#

maybe i need to download the javafx? first

#

from the site

burnt wigeon
sonic moth
#

ok tho it is not there

burnt wigeon
# sonic moth

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

sonic moth
#

i clciked smth and somehow it brought 100 more thing

#

idek

severe sky
sonic moth
sonic moth
burnt wigeon
sonic moth
# sonic moth

@severe sky like ts is for everyone not free trail?

severe sky
#

JavaFX was always free.

burnt wigeon
sonic moth
sonic moth
burnt wigeon
# sonic moth

you'd select one of the ones with "org.openjfx" on the left side as these are official

sonic moth
#

anyone of them?

burnt wigeon
#

Do you want to use FXML/scene builder?

sonic moth
#

i got two of theml

#

fxml or simple

burnt wigeon
#

Do you want to use Scene builder?

sonic moth
#

idk what that is i just started lol

burnt wigeon
#

I guess just atart with the -simple one

sonic moth
#

cuz im just tryina elarn guis

burnt wigeon
#

Scene builder gives you a GUI for designing GUIs that can more or less be loaded with JavaFX

sonic moth
burnt wigeon
#

The artifact ID is more or less the project name

#

the group id should basically identify you

#

or whoever owns the project

sonic moth
#

so enter wtv name?

#

for both

#

artifical and group

burnt wigeon
#

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

sonic moth
#

ok

#

i dont get it lol but i will just right deendefined ig

#

anything else or that page

sonic moth
burnt wigeon
#

you can change the JavaFX version in the properties to 25 or similar if you want to

#

but you don't have to

sonic moth
#

does it make a difference

#

ok done

burnt wigeon
#

then you can click on finish

sonic moth
#

this was the last thing it gave

#

package: deendefined.Testing

#

but nothing oepned

burnt wigeon
#

Can you show a screenshot?

sonic moth
burnt wigeon
# sonic moth

in the console, you need to confirm it by typing Y

sonic moth
#

ok down

#

done*

#

1 thing how do i fix the colours

#

it looks so... old.

burnt wigeon
#

If you want to change what Eclipse looks like, you can do that in Window > Preferences > General > Appearance

burnt wigeon
#

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"

sonic moth
#

HUH

#

its already dark

#

why is it gray not black then

burnt wigeon
#

that dark gray is the dark theme

#

It is possible to add custom colors for people that really want to customize it though

sonic moth
#

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

burnt wigeon
# sonic moth

set catalog to a different option (maybe Maven Central)

#

and select the javafx-archetype-simple (the same one as before)

sonic moth
#

simple for now?

burnt wigeon
#

yes

burnt wigeon
sonic moth
burnt wigeon
#

yes

sonic moth
#

also the default jdk it gave?

burnt wigeon
#

probably

sonic moth
#

ok now what

burnt wigeon
#

Screenshot?

sonic moth
burnt wigeon
#

That should be a working JavaFX project (the same that you also created with Eclipse)

sonic moth
#

ok i will now watch the tutorial above

#

where do i code

#

in what file

#

oh in src

#

nvm

#

im blind

burnt wigeon
#

the relevant files are in src/main/java, yes

sonic moth
#

weird

#

it's using "var"

brave nightBOT
#
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.

sonic moth
#

confused why they used var

burnt wigeon
#

Because they decided to do it that way? Both options work

sonic moth
#

i mean isnt var old?

burnt wigeon
#

In JavaScript, yes

#

In Java, no

sonic moth
#

oh lol

#

so for me the layout is different than the ones using javafx?

burnt wigeon
#

var is a bit of a different concept in Java than in JS

sonic moth
#

in terms of file structure

sonic moth
burnt wigeon
#

if you don't want it to be modifiable, you need final

#

e.g. final var

#

or final Scene scene = new Scene(...);

sonic moth
#

oh var is jut creatin variable without definign the type

#

until the data is put in

sonic moth
# burnt wigeon 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

burnt wigeon
sonic moth
#

is that cuz of uh maven

#

they got a file

#

named application.css?

lyric coyoteBOT
#

๐Ÿ’ค 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.

burnt wigeon
#

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

lyric coyoteBOT
#

๐Ÿ’ค 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.

sonic moth
#

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

hot shell
#

holy moly

#

250 messages

sonic moth
#

tbh no point changing every second

#

ima just continue learning guis for now

#

and uh

#

do some projects

#

then do smth els

#

ykwim

hot shell
sonic moth
#

lol

burnt wigeon
#

But JavaFX is a pretty complicated topic

sonic moth
#

Any recommendations for proper projects

burnt wigeon
#

whatever is interesting to you

sonic moth
sonic moth
#

Using Java gui

burnt wigeon
#

yes

sonic moth
#

ik i can just put path link

#

but i want to understand why it is not connecting

sonic moth
#

@severe sky

#

i was told to stop learning javafx scenebuilder

#

as its not sued anymore?

lyric coyoteBOT
#

๐Ÿ’ค 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.

severe sky
#

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.

burnt wigeon
burnt wigeon
#

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

sonic moth
#

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

sonic moth
#

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

burnt wigeon
#

sounds good

sonic moth
#

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

sonic moth
#

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?

burnt wigeon
#

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

sonic moth
#

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

burnt wigeon
#

You can still use the Maven project structure (with src/main/java etc) if you want to

sonic moth
#

or continue my structure

burnt wigeon
#

I would personally keep the structure with src/main/java etc

sonic moth
#

and just change the code in app to his code

burnt wigeon
#

sure

lyric coyoteBOT
#

๐Ÿ’ค 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.