Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to change Java icon in frame ?

 
Calanthe Wei
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, All
I build up a frame with swing and want to change the Sun java icon on the left top of the frame to other image. Did anyone happen to know how to do that?
I really appreciate it.

Calanthe
 
Alex Ku
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
JFrame f = new JFrame();
f.setIconImage(new ImageIcon("imageFile").getImage());
kawaii
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic