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

mult. probs with Metal PLAF-decorated JFrame (restore, maximize, drag, resize)

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 1.4.0
    • 1.4.0
    • client-libs
    • beta2
    • generic, x86
    • generic, windows_98, windows_2000



      Name: krC82822 Date: 06/03/2001


      orig synopsis: "Problem restoring a JFrame's size with LookAndFeelDecorated=true"

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

      The problem seems to happen when maximizing a JFrame with
      the property defaultLookAndFeelDecorated=true. Trying to restore the
      JFrame to its original size from the restore button will fail.

      The problem seeem to occur only with the Metal L&F on Windows 2000.
      [Actually, under Solaris, _maximize_ doesn't work, so one never
      gets a chance to try (to) restore. --eval1127@eng, 3 June 2001]

      A sample code that demonstrates this problem:

      import javax.swing.JFrame;
      import javax.swing.UIManager;

      public class LaF_Frame extends JFrame
      {
        LaF_Frame()
        {
          setSize(600,400);
        }

        public static void main(String args[])
        {
          JFrame.setDefaultLookAndFeelDecorated(true);
          new LaF_Frame().show();
        }
      }
      (Review ID: 125405)
      ======================================================================

      Name: krC82822 Date: 06/03/2001


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

      Run this program. Click the maximize button. The frame maximizes and the
      maximize icon in the title bar changes to 'de-maximize'.
      Note the following bugs:

      1) Clicking on the de-maximize button in the title bar has _no_ effect.

      2) When you move the mouse to the window borders the cursor changes to a resize
         cursor (though one cannot resize the window).
      [see also bug # 4394457]

      3) You _can_ drag the window to another position using the title bar. This
         should not be possible.

      I don't think this is platform specific, but maybe part of the problem comes
      from my dual monitor configuration:
      Windows 2000, SP2, Matrox G450 graphics card in true dual head mode (two graphic
      adapters visible in window's settings), latest drivers (v5.52).

      import javax.swing.*;
      public class MaxFrame extends JFrame {
          public static void main(String[] args) {
              JFrame.setDefaultLookAndFeelDecorated(true);
              
              JFrame f = new JFrame();
                     
              f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              f.pack();
              f.setBounds(100, 100, 100, 100);
              f.setVisible(true);
          }
      }
      (Review ID: 125298)
      ======================================================================

      Name: krC82822 Date: 06/03/2001


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

      The new 1.4 Metalworks demo which uses a PLAF decorated frame demonstrates this
      problem. If you maximize the frame, it covers the entire screen even though it
      should not cover the Windows taskbar.

      Additionally, the frame is still draggable (maximized windows should be locked
      in place under Windows), and when dragged you can see that it does not have a border anymore. The lack of a border may or may not be a problem depending upon whether the frame is ultimately locked in place or not.

      The frame also cannot be restored (un-maximized) - clicking the restore button has no effect.
      (Review ID: 125446)
      ======================================================================

            joutwatesunw Joshua Outwater (Inactive)
            kryansunw Kevin Ryan (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: