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

Dragged internal frame leaves artifacts for floating point ui scale

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 9
    • 9
    • client-libs
    • b127

      Steps to reproduce:
      - Run the following code with option -Dsun.java2d.uiScale=1.5
      - Drag the internal frame
      There are line artifacts on the desktop pane
      -------------------------
      import javax.swing.*;
      import java.awt.BorderLayout;

      public class DragInternalFrameTest {

          public static void main(String[] args) throws Exception {
              SwingUtilities.invokeAndWait(DragInternalFrameTest::UI);
          }

          private static void UI() {

              JFrame frame = new JFrame();
              frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              frame.setLayout(new BorderLayout());
              JDesktopPane desktopPane = new JDesktopPane();

              frame.add(desktopPane, BorderLayout.CENTER);
              frame.setSize(700, 500);
              frame.setLocation(100, 100);
              frame.setVisible(true);

              JInternalFrame internalFrame = new JInternalFrame("Test");
              internalFrame.setSize(200, 200);
              desktopPane.add(internalFrame);
              internalFrame.setVisible(true);

              frame.setLocation(0, 0);
              frame.setVisible(true);
          }
      }
      -------------------------

            alexsch Alexandr Scherbatiy
            alexsch Alexandr Scherbatiy
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: