aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes Frame minimize and maximize buttons Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Frame minimize and maximize buttons" Watch "Frame minimize and maximize buttons" New topic
Author

Frame minimize and maximize buttons

Neh Agarwal
Greenhorn

Joined: Feb 27, 2009
Posts: 24
hi,

In the project I have a frame which has only the close button and not the minimize and maximize button.

I am not able to find out why those buttons are not visible.

Please help.

Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10451
    
    8

Hi Neh,
Welcome to the Ranch.

Are you sure it is a JFrame and not a JDialog? You can find this out by looking at the source code.

Usually, dialogs are displayed without the maximize/minimize buttons. So if you want these buttons you will have to subclass JFrame and then use it.


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
Neh Agarwal
Greenhorn

Joined: Feb 27, 2009
Posts: 24
Hi,

Thanks for the reply,

Is there any way I can have minimize and maximize buttons in JDialog or I have to subclass JFrame and use that only.

Thanks
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10451
    
    8

Do you want a "modal" behavior; use JDialog/JOptionPane.
If modal behavior is not required go for JFrame.
Neh Agarwal
Greenhorn

Joined: Feb 27, 2009
Posts: 24
hi,

I was actually using JDialog instead of Frame, so after replacing it with Frame, I got those buttons!

Thanks again for the help!
Neh Agarwal
Greenhorn

Joined: Feb 27, 2009
Posts: 24
Neh,
I have edited your post.
Please read http://faq.javaranch.com/java/UseOneThreadPerQuestion and http://faq.javaranch.com/java/HowToAskQuestionsOnJavaRanch
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Frame minimize and maximize buttons