wood burning stoves 2.0*
The moose likes Swing / AWT / SWT and the fly likes Icon for the title frame of  the JDialog Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Icon for the title frame of  the JDialog" Watch "Icon for the title frame of  the JDialog" New topic
Author

Icon for the title frame of the JDialog

Archana Venu Aradhyula
Greenhorn

Joined: Nov 05, 2008
Posts: 13
I use JDialog in my application. When is set its resizable method to true the icon that is set for the dialog is visible. But my requirement is that the dialog must not be resiazable. If is set this to false then the icon that is set is not visible.How do i achieve this?

Thanks
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10268
    
    8

How are you creating the JDialog?
JOptionPane.showXXXDialog has several overloaded methods which provide you a JDialog with an option of your choice.


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
Kuladip Yadav
Ranch Hand

Joined: Jul 30, 2008
Posts: 162

I don't know how do you create JDialog.
But you can try somthing like this :



Thanks

Kuldeep Yadav
[ December 10, 2008: Message edited by: Kuldeep Yadav ]
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
the icon area also contains the menu (size/maximize etc),
and is partly the reason why it's not there when not resizable.

couple of things you might try:
1) remove the titlepane - adding back your own
2) leave it resizable, but remove the mouseMotionListener (stop dragging frame taller/wider etc)
would need to add back a mouseMotionListener to drag the dialog to a new location
 
 
subject: Icon for the title frame of the JDialog