This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes JFrame Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JFrame" Watch "JFrame" New topic
Author

JFrame

vandana
Greenhorn

Joined: Mar 29, 2001
Posts: 13
hi,
Is there any method by which i can change the standard java icon
i.e; a cup with steams which is present at the top left corner of any JFrame?
I want that my application should hv the icon which i hv designed.
Rahul Mahindrakar
Ranch Hand

Joined: Jul 28, 2000
Posts: 1851
Yes you can use
Frame1.setIconImage(Toolkit.getDefaultToolkit().getImage("images"+File.separator+"title.gif"));
or
Frame1.setIconImage(Toolkit.getDefaultToolkit().getImage(ClassLoader.getSystemResource("images/Title.gif")));

Vandana
Welcome to Javaranch. We follow some rules pertaining to User names. The rules are specified at here
Your User name does not follow these conventions. It is recommended that you immediately register under a name conforming to the conventions.
Also since this topic is not relevant to the Threads and Synchronization area I am transfering it to an apporpriate forum.
Thanks.
 
wood burning stoves
 
subject: JFrame