File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Swing / AWT / SWT and the fly likes Closing Maximizing and Minimizing 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 "Closing Maximizing and Minimizing Buttons" Watch "Closing Maximizing and Minimizing Buttons" New topic
Author

Closing Maximizing and Minimizing Buttons

Mabel Ahmad
Greenhorn

Joined: Feb 03, 2006
Posts: 8
Is there a way to get rid of the little Minimizing, Maximizing, and Closing buttons at the top right corrner of a window?

[-][_][X] <-- those buttons
pravinth Ganesan
Greenhorn

Joined: Oct 23, 2005
Posts: 13
Yes,
You can handle the WindowClosing,minimize,maximize events -u can write code in these events-so nothing will happen when the max,min,close-buttons of the frame is pressed.
if u want a different frame without buttons,with different design-why not you can go for IBM's IFrame(extends JFrame)
http://www-128.ibm.com/developerworks/java/library/j-iframe/


Have a nice day
Mathias Nilsson
Ranch Hand

Joined: Aug 21, 2004
Posts: 367
Hi! You can get rid of the minimize,maximize by using a JDialog istead of a JFrame



SCJP1.4
Mabel Ahmad
Greenhorn

Joined: Feb 03, 2006
Posts: 8
Thanks a lot guys for the information and help!! Really appreciated!!

Mathias how would you only get rid of the close button but keep the other 2 buttons?

Thanks again!
Mathias Nilsson
Ranch Hand

Joined: Aug 21, 2004
Posts: 367
You can't.... you can however do nothing on close



This will make the JFrame not closing on the x mark.


you can altso set the setUndecorated(true); on the JFrame. This will remove all the options.

You can use the setResizable(false); if you want to enable a user to maximize a Jframe

// Mathias
[ February 19, 2006: Message edited by: Mathias Nilsson ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Closing Maximizing and Minimizing Buttons