This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes Setting Title Icon in JDialog Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Setting Title Icon in JDialog" Watch "Setting Title Icon in JDialog" New topic

Setting Title Icon in JDialog


Joined: Jul 24, 2002
Posts: 2
I have a problem with JDialog.
Well, I have a JDialog object whose resizable property is set to false i.e by setResizable (false). In this case, it does not display an icon in its Title bar. When its resizable property is set to true by using setResizable( true ), it shows Java Icon there. What i need is, i should have a JDialog object with its resizable property set to false (by setResizable( false )) and have a java icon its Title bar.
Could you help me in this?
Thanks in Advance,
Nathan Pruett

Joined: Oct 18, 2000
Posts: 4121

"Ciddharthan" -

Welcome to the JavaRanch! Please adjust your displayed name to meet the
JavaRanch Naming Policy.
You can change it here.

Now, on to the question...

Read this bug report on Sun's site... Non-resizable dialogs aren't supposed to have icons because you can click on the icon to resize the dialog.

Thanks! and welcome to the JavaRanch!

Write once, run anywhere, because there's nowhere to hide! - /. A.C.
Alex Kostin

Joined: Oct 11, 2012
Posts: 1
Now it works:

I agree. Here's the link:
subject: Setting Title Icon in JDialog
Similar Threads
Icon on JDialog with resize false
setResizable hides the icon on the title bar
problem while using Dialog.setResizable(true).
Titile icon for JDialog
Icon for the title frame of the JDialog