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 JFrame disable minimize button (jdk1.3) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JFrame disable minimize button (jdk1.3)" Watch "JFrame disable minimize button (jdk1.3)" New topic
Author

JFrame disable minimize button (jdk1.3)

Eric Espares
Greenhorn

Joined: Apr 04, 2002
Posts: 12
Hi,

How can I disable the 'MINIMIZE' button of a JFrame in JDK1.3?

Thanks,
Eric
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15286
    
    6

You can't. The only thing you can do is use a JWindow or a JFrame with setUndecorated(true) so that the title bar isn't there at all.

Just tried something else, but it's ugly. In the windowIconified method of the WindowListener you can setExtendedState(JFrame.MAXIMIZED_BOTH); Problem with this is it will maximize your app whether you want it to or not but more importantly you will see it minimize then maximize itself. Pretty ugly.
[ July 01, 2004: Message edited by: Gregg Bolinger ]

GenRocket - A Test Data Generation Platform
Eric Espares
Greenhorn

Joined: Apr 04, 2002
Posts: 12
Hi Gregg,

Thanks for your inputs.

One thing more. How do I iconify or deiconify a JFrame?

Thanks,
Eric
R.Joe
Ranch Hand

Joined: Jun 16, 2004
Posts: 31
Hello Eric,
for deiconified or iconified u can use the method
frame1.setExtendedState(0) or frame1.setExtendedState(1) along this u has to use
frame1.show() and frame1.toFront();
just simplecode is this
******************
if (frame1.getExtendedState()==1){
frame1.setExtendedState(0);
}
frame1.show();
frame1.toFront();
************
from this code it check if it is iconified it get deconified or do what u need
Regards,
Ravi
Eric Espares
Greenhorn

Joined: Apr 04, 2002
Posts: 12
Hi Ravi,

Thanks for you reply.

How about if I wish to iconify or deiconify two or more windows (all in JFrame) in one time?

Cheers,
Eric
R.Joe
Ranch Hand

Joined: Jun 16, 2004
Posts: 31
hello,
So u take all the jframe in an array
regards ,
ravi
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JFrame disable minimize button (jdk1.3)
 
Similar Threads
how to disable minimize option in JFrame
Minimize button in JFrame
disabling minimize icon in JFrame
How to hide the minimize and maximize button of a frame?
Disabling minimize and maximie button