This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
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: 10167
    
    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: 10167
    
    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
 
wood burning stoves
 
subject: Frame minimize and maximize buttons
 
Similar Threads
How do you maximize on frame load?
Adding Maximize and minimize buttons in Jdialog
Frame without M&M buttons
Customize JFrame
JFrame problems.....