eh
import javax.swing.*;
the icon is not changing
i feel like something is wrong with my project file .-.
9 Replies
⌛
This post has been reserved for your question.
Hey @MoonSouhayl! Please useTIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here./close
or theClose Post
button above when you're finished. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.
The file probably can't be found with just new ImageIcon("icon.png"). That doesn't tell where it is
As a project is typically packaged as a .jar or otherwise runnable file in the end, files should be read as resources rather than files on the filesystem anyway
sooo
what i should replace the "icon.png" with ?
🙂
Have you even made one google search?
ye
but i never find an answer
:idontunderstand:
How to Use Icons (The Javaâ„¢ Tutorials >
Creatin...
Creatin...
This Swing Java Tutorial describes developing graphical user interfaces (GUIs) for applications and applets using Swing components
I find it weird that it took you less than 40 seconds to make all the research you needed to know you've not found what you need by yourself
But eh, weird as it is, that happened to me sometimes
nah it took 48s
and also i don't like solutions that just add so many things i didn't reach
💤
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.