JDK-4080710 : java.awt.Frame.setResizable(false) does not disable the Frame's maximize button
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 1.1.4,1.1.5,1.1.7
  • Priority: P4
  • Status: Closed
  • Resolution: Cannot Reproduce
  • OS: generic,windows_95,windows_nt
  • CPU: generic,x86
  • Submitted: 1997-09-22
  • Updated: 1998-10-22
  • Resolved: 1998-10-22
Related Reports
Duplicate :  
Relates :  
Description

Name: diC59631			Date: 09/22/97


Calling java.awt.Frame.setResizable(false) on a Windows Frame does not disable the Frame's maximize button.  This enables users to change the size of the frame by maximizing it.
company - Avesta Technologies, Inc. , email - ###@###.###
=========================================================


erik.larsen@Eng 1998-04-22      Here's another user experiencing the same problem.

1) Create a Frame or a JFrame with setResizable(false).
Verify that the frame doesn't resize, then click the maximise button.

2)
import java.awt.*;

public class Application1 {

  public Application1() {
    	Frame frame = new Frame();
    	frame.setSize(new Dimension(400, 300));
    	frame.setResizable (false);
    	frame.validate();
    	frame.setVisible(true);
    }

  static public void main(String[] args) {
    new Application1();
  }
}

(company - Cromwell Media , email - ###@###.###)

Comments
WORK AROUND Name: diC59631 Date: 09/22/97 No known workaround. ======================================================================
11-06-2004

EVALUATION This is a problem on both Win32 and Solaris. creighton.chong@eng 1997-11-24 Tried this diff (src/solaris/sun/awt_Frame.c): ------- awt_Frame.c ------- 825a826 > XtSetArg(args[argc], XmNmwmFunctions, MWM_FUNC_ALL); argc++; 827a829,830 > XtSetArg(args[argc], XmNmwmFunctions, > MWM_FUNC_ALL | MWM_FUNC_MAXIMIZE); argc++; This stops the maximize button from changing the size of the window, but the window still jumps to (0,0) when the button is clicked. I think this is because twm, vtwm, fvwm, CDE, etc... define the maximize button to call multiple Zoom functions, whereas mwm just defined the button to call f.maximize. So I think this diff might work on mwm, but not on every window manager. (Of course, this argument modification would need to be propogated to all places where resize is changed.) david.mendenhall@eng 1998-02-11 Problem is no longer reproducible in 1.1.7 (I fixed it for Win32 there). robi.khan@eng 1998-10-22
11-02-1998