< prev index next >
test/jdk/java/awt/Robot/HiDPIScreenCapture/HiDPIRobotScreenCaptureTest.java
Print this page
*** 36,46 ****
* @test
* @key headful
* @bug 8073320
* @summary Windows HiDPI support
* @author Alexander Scherbatiy
! * @requires (os.family == "windows")
* @run main/othervm -Dsun.java2d.win.uiScaleX=3 -Dsun.java2d.win.uiScaleY=2
* HiDPIRobotScreenCaptureTest
*/
public class HiDPIRobotScreenCaptureTest {
--- 36,46 ----
* @test
* @key headful
* @bug 8073320
* @summary Windows HiDPI support
* @author Alexander Scherbatiy
! * @requires (os.family == "linux" | os.family == "windows")
* @run main/othervm -Dsun.java2d.win.uiScaleX=3 -Dsun.java2d.win.uiScaleY=2
* HiDPIRobotScreenCaptureTest
*/
public class HiDPIRobotScreenCaptureTest {
*** 48,63 ****
--- 48,65 ----
private static final Color[] COLORS = {
Color.GREEN, Color.BLUE, Color.ORANGE, Color.RED};
public static void main(String[] args) throws Exception {
+ if (System.getProperty("os.name").toLowerCase().contains("win")) {
try {
UIManager.setLookAndFeel(
"com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
} catch (Exception e) {
return;
}
+ }
Frame frame = new Frame();
frame.setBounds(40, 30, 400, 300);
frame.setUndecorated(true);
< prev index next >