?
Solved

How to change the top left program icon in swing

Posted on 2003-03-25
4
Medium Priority
?
241 Views
Last Modified: 2013-12-16
Hello there,
I have a problem identifying the top left program icon in swing, that's the one that's on the program tool bar... there must be a way to override the default CoffeeCup icon somehow does anybody know?

Thanks,
Mentar
0
Comment
Question by:mentar
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 

Author Comment

by:mentar
ID: 8207538
sorry I meant the title bar not the tool bar
0
 
LVL 1

Expert Comment

by:odog1999
ID: 8207567
When you create a new JFrame, you can pass it as a parametera a GraphicsConfiguration component, which will show up in the top left corner of the screen.  If it is null, the default icon will be used.

hth,
Odog
0
 
LVL 9

Accepted Solution

by:
yongsing earned 400 total points
ID: 8207580
You can change the icon as follows:

ImageIcon icon = new ImageIcon("system.gif");
frame.setIconImage(icon.getImage());
0
 

Author Comment

by:mentar
ID: 8207588
Thanks... just tried it works perfectly :)
0

Featured Post

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
Originally, this post was published on Monitis Blog, you can check it here . It goes without saying that technology has transformed society and the very nature of how we live, work, and communicate in ways that would’ve been incomprehensible 5 ye…
The purpose of this video is to demonstrate how to integrate Mailchimp with WordPress, by placing a Mailchimp signup form on a WordPress Page or Post. This will be demonstrated using a Windows 8 PC. Mailchimp will be used. Log into your Mailchi…
This video teaches viewers about errors in exception handling.
Suggested Courses
Course of the Month14 days, 7 hours left to enroll

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question