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

1.1.7 Introduces win32 minimize/restore problem.

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Duplicate
    • Affects Version/s: 1.1.7
    • Fix Version/s: None
    • Component/s: client-libs

      Description

      On win32 with JDK 1.1.7E, when a JFrame uses a BorderLayout and adds JPanels, the JFrame fails to display properly when it is minimized and restored.

      In the test case below, the center JPanel is shifted downwards and to the left.
      The right JPanel is partially removed, and the bottom JPanel is no longer visible.

      Resizing the JFrame causes the JPanels to be displayed properly.

      This behavior is a regression from the 1.1.6 functionality.

      ---------------------------------- BuggyFrame.java -----------------------------
      import java.awt.*;
      import java.awt.event.*;
      import com.sun.java.swing.*;

      class BuggyFrame extends JFrame {

          BuggyFrame() {
              super("BuggyFrame");
          }

          public static void main(String args[]) {

              BuggyFrame frame = new BuggyFrame();
              frame.getContentPane().setLayout(new BorderLayout());

              JPanel centerPanel = new JPanel();
              centerPanel.setBackground(Color.white);
              frame.getContentPane().add("Center", centerPanel);

              JPanel rightPanel = new JPanel();
              rightPanel.setBackground(Color.red);
              frame.getContentPane().add("East", rightPanel);

              JPanel bottomPanel = new JPanel();
              bottomPanel.setBackground(Color.black);
              frame.getContentPane().add("South", bottomPanel);

              frame.addWindowListener(new WindowAdapter() {
                  public void windowClosing(WindowEvent e) {
                      System.exit(0);
                  }
              });

              frame.pack();
              frame.setSize(500, 600);
              frame.show();
          }
      }

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                amfowler Anne Fowler (Inactive)
                Reporter:
                nrodinsunw Nick Rodin (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: