Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4347482

strange behaviour resizing a JInternalFrame after setting setMaximumSize ...

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 1.4.0
    • 1.3.0, 1.3.1
    • client-libs
    • beta
    • x86
    • windows_nt, windows_2000



      Name: jk109818 Date: 06/22/2000


      java version "1.3.0"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-C)
      Java HotSpot(TM) Client VM (build 1.3.0-C, mixed mode)


      The problem appears after setting the maximum size of
      a JInternalFrame to its original size. (JDK1.3, Win NT4)

      When you try to resize the InternalFrame to a greater size, which shoud
      not be possible with the setMaximunSize property, the frame
      grows up by doubling instantly its size.

      The program rises no exception.

      Here is a sample code reproducing this bug :

      import javax.swing.*;
      import java.awt.*;

      public class testInternalFrame extends JFrame {

        public static void main(String[] args) {
           testInternalFrame ti = new testInternalFrame();
            ti.setSize(300,300);
             ti.setVisible(true);
          }


          public testInternalFrame() {
             super();
             JDesktopPane j = new JDesktopPane();
      getContentPane().setLayout(new BorderLayout());

         JInternalFrame jif = new JInternalFrame();
           j.add(jif);
              jif.setResizable(true); jif.setClosable(true); jif.setIconifiable(true);

            jif.setSize(100,100);
           jif.setMaximumSize(jif.getSize());
            jif.setVisible(true);

      getContentPane().add(j,BorderLayout.CENTER);
          }
      }

      I found no workaround for this bug, any help will be appreciated.

      Note that this bug exists with the JDK1.2 for windows NT4 too.
      (Review ID: 105387)
      ======================================================================

            joutwatesunw Joshua Outwater (Inactive)
            jkimsunw Jeffrey Kim (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: