• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to hide the minimize and maximize button of a frame?

 
mani senthil
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi friends
i need to create dialog box without having any controls on the title bar of the frame. which function do i use for that.
 
Maneesh Godbole
Saloon Keeper
Posts: 11096
13
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You are asking multiple questions which are a bit confusing.

Your title says hide maximize and minimize buttons in a frame.
Then you mention a dialog box without any controls.

Which one of it is it?
 
mani senthil
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Maneesh Godbole wrote:You are asking multiple questions which are a bit confusing.

Your title says hide maximize and minimize buttons in a frame.
Then you mention a dialog box without any controls.

Which one of it is it?


the first one is what i need.
 
binayakumar patel
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Mani,

In JFrame you can disable the Resize button as well as the Close button but can not override the minimize button.
We can not hide these 3 buttons also.

To disable the Resize Button and Close button , you have to write below code.


If you want to Hide the Minimize Button and Resize Button then in place of JFrame use JDialog, It will show only the close button.
and to Disable the Close Button use the above code...


If you want to hide all these 3 button present in Title bar then use Window Class



Regards
Binaya
 
Rob Spoor
Sheriff
Pie
Posts: 20610
63
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You mean JWindow of course

You can also use an undecorated (hint: look for that word in the API) JFrame.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic