• Post Reply Bookmark Topic Watch Topic
  • New Topic

How do I add a custom icon to my Swing app?  RSS feed

 
Ranch Hand
Posts: 414
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is using the default Sun Java cup. Also, it will be wrapped up in a jar file. I don't know if that makes a difference.
 
Ranch Hand
Posts: 174
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can call the setIconImage method on the JFrame.

It takes in an Image object.
If you are going to load the image from a jar you could use -



HTH,
Aaron R>
 
M Burke
Ranch Hand
Posts: 414
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks, Aaron
 
Humans and their filthy friendship brings nothing but trouble. My only solace is this tiny ad:
Rocket Oven Kickstarter - from the trailboss
https://coderanch.com/t/695773/Rocket-Oven-Kickstarter-trailboss
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!