• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

disabling MAXIMIZE button

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hello friends,
this is my first postin and i want to know if there is any means of disabling the maximize button in a frame or jframe
it would be very helpfull if someone can help me out in this
thank u all and bye
 
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes there is.
For a frame, you can user the line:
setResizable(false);
For a Jframe, I believe it is the same, but not sure.
 
GIRISH L
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks for the reply,
but if i do that even the minimize button will be disabled
thank u
 
Bartender
Posts: 783
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Girish,
You wrote, "but if i do that even the minimize button will be disabled." And so it should be. If you invoke setResizable(false);, then the application shows the (default) maximum window size. If you want a smaller window size, then you should set your window size accordingly. Why would you want to enable the minimize button without the ability to maximize your Frame? It doesn't make sense. If you notice, the maximize button changes to a minimize button when invoked.
Okay, imagine me as your User. I start your application. The window/frame is displayed to me. And the minimize button is enable (somehow you hacked the JDK to make it possible). I then click on the Minimize button and the Window shrinks accordingly. Now as a naive User I'm not happy with the new smaller size, so I want to go back to the original "maximize" application size. But I can't. I get frustrated and refuse to use your application ever again. I then get on a forum like JavaRanch and tell everyone how horrible your application is, because it forces me to use it in a certain manner. No one else buys your application, and you go bankrupt. Get the ideal?
-Peter
 
GIRISH L
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks!
but what i meant by disabling max button is : it should not be highlighted i.e user should not modify the size of frame!
minimising is nothing but iconifying it;
please suggest me methods so that maximise button is not highlighted!
thanks in advance!
bye giri!
 
Sheriff
Posts: 7001
6
Eclipse IDE Python C++ Debian Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"GIRISH L",
The Java Ranch has thousands of visitors every week, many with surprisingly similar names. To avoid confusion we have a naming convention, described at http://www.javaranch.com/name.jsp . We require names to have at least two words, separated by a space, and strongly recommend that you use your full real name. Please choose a new name which meets the requirements.
Thanks.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic