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

REGRESSION: Frame's GC not updated when dragged to 2nd screen under XAWT

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 5.0
    • Fix Version/s: 5.0
    • Component/s: client-libs
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b26
    • CPU:
      generic
    • OS:
      generic

      Description

      When a top-level Window such as a Frame is dragged from one screen to another of a multi-monitor system, it's GraphicsConfiguration is updated to reflect the new device it is on. Under XAWT, this updating doesn't happen. The test below demonstrates this. Run it and drag the Frame to various screens and dump the GC. You'll notice it isn't updated.
      // Get the GraphicsConfiguration of a Frame

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

      public class GetFrameGC extends Frame implements ActionListener {
          public GetFrameGC() {
              super("GetFrameGC");
              Button b = new Button("getGC");
              b.addActionListener(this);
              add(b);
              setSize(100, 100);
          }
          public void actionPerformed(ActionEvent e) {
              GraphicsConfiguration gc = getGraphicsConfiguration();
              System.out.println("gc:" + gc + gc.getBounds());
          }
          public static void main(String[] args) {
              GetFrameGC f = new GetFrameGC();
              f.setVisible(true);
          }
      }

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              bchristi Brent Christian
              Reporter:
              bchristi Brent Christian
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: