Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Frame minimize and maximize buttons

 
Neh Agarwal
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 11092
13
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Neh Agarwal
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 11092
13
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you want a "modal" behavior; use JDialog/JOptionPane.
If modal behavior is not required go for JFrame.
 
Neh Agarwal
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 24
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic