- 
    Bug 
- 
    Resolution: Fixed
- 
     P3 P3
- 
    9
- 
        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);
}
}
-------------------------
- 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);
}
}
-------------------------
- relates to
- 
                    JDK-8160124 SunGraphics2D.hitClip() can give wrong result for floating point scale -           
- Closed
 
-