• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

JFrame disable minimize button (jdk1.3)

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

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

Thanks,
Eric
 
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ]
 
Eric Espares
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Gregg,

Thanks for your inputs.

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

Thanks,
Eric
 
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hello,
So u take all the jframe in an array
regards ,
ravi
 
There’s no place like 127.0.0.1. But I'll always remember this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic