Skip to main content

How to set title bar Image for Swing Frame ?

3 replies [Last post]
nerj
Offline
Joined: 2009-01-07

Hi! All---
Can u please tell me, How to set title bar Image for Swing frame. I mean that, by default every swing frame be displayed with java symbol at top left corner including title. Can we set out own image instead of that? Pls, suggest me the solution------

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
walterln
Offline
Joined: 2007-04-17

The javadoc is located [url=http://java.sun.com/javase/6/docs/api/]here[/url], you are looking for Window#setIconImages().

nerj
Offline
Joined: 2009-01-07

Thanks for ur reply, but I haven't see the icon to be changed to specified image, even I used setIconImage() method.

I have another doubt,
Can u pls tell me how to maximize the window which is at windows taskbar by peforming some action. pls, suggest me-----

walterln
Offline
Joined: 2007-04-17

It works for me, so you're doing something wrong. Try making a small, compilable program with shows the problem.

For maximizing, did you follow my link? Search for JFrame, then maximize.