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

win32 iconize & deiconize window - window contents shift down

XMLWordPrintable

    • sparc
    • solaris_2.6

      On win32 iconize the window & deiconize the window and the entire contents of the window shift down by about 20 pixels. The problem does not appear on Solaris. "JDK-1.2beta4-F" & "JDK-1.2fcs-D"

      /**
       * setenv JAVA_HOME /usr/local/java/jdk1.2/solaris
       * ${JAVA_HOME}/bin/javac Win32LayoutBug.java
       * ${JAVA_HOME}/bin/java Win32LayoutBug
       */


      import java.awt.swing.*;

      import java.awt.*;
      import java.awt.event.*;



      public class Win32LayoutBug
      {
          public static void main(String[] args)
          {
      Container p = new Container() {
      public Dimension getPreferredSize() {
      return new Dimension(300, 300);
      }
      public void paint(Graphics g) {
      super.paint(g);
      g.setColor(getBackground());
      g.fillRect(0, 0, getWidth(), getHeight());
      System.out.println(this);
      }
      };
      p.setBackground(Color.red);

      Frame f = new Frame("Win32LayoutBug");
      WindowListener l = new WindowAdapter() {
      public void windowClosing(WindowEvent e) {System.exit(0);}
      };
      f.addWindowListener(l);
      f.add(p, BorderLayout.CENTER);
      f.pack();
      f.show();
          }
      }

            Unassigned Unassigned
            blichtensunw Brian Lichtenwalter (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: