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
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
posted 18 years ago
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!
"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.