author | akolarkunnu |
Wed, 18 Sep 2019 07:18:44 -0700 | |
changeset 58326 | 34b6db069d68 |
parent 47216 | 71c04702a3d5 |
permissions | -rw-r--r-- |
40434
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
1 |
/* |
58326
34b6db069d68
8165828: [TEST_BUG] The reg case:javax/swing/plaf/metal/MetalIcons/MetalHiDPIIconsTest.java failed as No Metal Look and Feel
akolarkunnu
parents:
47216
diff
changeset
|
2 |
* Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. |
40434
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
4 |
* |
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
5 |
* This code is free software; you can redistribute it and/or modify it |
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
7 |
* published by the Free Software Foundation. |
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
8 |
* |
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
13 |
* accompanied this code). |
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
14 |
* |
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
15 |
* You should have received a copy of the GNU General Public License version |
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
18 |
* |
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
20 |
* or visit www.oracle.com if you need additional information or have any |
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
21 |
* questions. |
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
22 |
*/ |
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
23 |
|
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
24 |
/* |
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
25 |
* @test |
58326
34b6db069d68
8165828: [TEST_BUG] The reg case:javax/swing/plaf/metal/MetalIcons/MetalHiDPIIconsTest.java failed as No Metal Look and Feel
akolarkunnu
parents:
47216
diff
changeset
|
26 |
* @bug 8160986 8174845 8176883 8165828 |
40434
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
27 |
* @summary Bad rendering of Swing UI controls with Metal L&F on HiDPI display |
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
28 |
* @run main/manual MetalHiDPIIconsTest |
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
29 |
*/ |
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
30 |
import java.awt.Color; |
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
31 |
import java.awt.GridBagConstraints; |
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
32 |
import java.awt.GridBagLayout; |
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
33 |
import java.awt.event.ActionEvent; |
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
34 |
import java.awt.event.ActionListener; |
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
35 |
import java.awt.event.WindowAdapter; |
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
36 |
import java.awt.event.WindowEvent; |
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
37 |
import java.util.concurrent.CountDownLatch; |
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
38 |
import java.util.concurrent.TimeUnit; |
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
39 |
import javax.swing.JButton; |
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
40 |
import javax.swing.JFrame; |
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
41 |
import javax.swing.JPanel; |
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
42 |
import javax.swing.JTextArea; |
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
43 |
import javax.swing.SwingUtilities; |
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
44 |
|
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
45 |
public class MetalHiDPIIconsTest { |
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
46 |
|
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
47 |
private static volatile boolean testResult = false; |
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
48 |
private static volatile CountDownLatch countDownLatch; |
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
49 |
private static final String INSTRUCTIONS = "INSTRUCTIONS:\n" |
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
50 |
+ "Verify that icons are painted smoothly for standard Swing UI controls.\n\n" |
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
51 |
+ "If the display does not support HiDPI mode press PASS.\n\n" |
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
52 |
+ "1. Run the SwingSet2 demo on HiDPI Display.\n" |
58326
34b6db069d68
8165828: [TEST_BUG] The reg case:javax/swing/plaf/metal/MetalIcons/MetalHiDPIIconsTest.java failed as No Metal Look and Feel
akolarkunnu
parents:
47216
diff
changeset
|
53 |
+ "2. Select Java Look and Feel. It is equivalent to Metal Look And Feel\n" |
40434
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
54 |
+ "3. Check that the icons are painted smoothly on Swing UI controls like:\n" |
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
55 |
+ " - JRadioButton\n" |
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
56 |
+ " - JCheckBox\n" |
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
57 |
+ " - JComboBox\n" |
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
58 |
+ " - JScrollPane (vertical and horizontal scroll bars)\n" |
44347
29a60737f3e7
8174845: Bad scaling on Windows with large fonts with Java 9ea
alexsch
parents:
40434
diff
changeset
|
59 |
+ " - JRadioButtonMenuItem\n" |
29a60737f3e7
8174845: Bad scaling on Windows with large fonts with Java 9ea
alexsch
parents:
40434
diff
changeset
|
60 |
+ " - JCheckBoxMenuItem\n" |
40434
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
61 |
+ "and others...\n\n" |
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
62 |
+ "If so, press PASS, else press FAIL.\n"; |
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
63 |
|
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
64 |
public static void main(String args[]) throws Exception { |
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
65 |
countDownLatch = new CountDownLatch(1); |
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
66 |
|
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
67 |
SwingUtilities.invokeLater(MetalHiDPIIconsTest::createUI); |
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
68 |
countDownLatch.await(15, TimeUnit.MINUTES); |
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
69 |
|
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
70 |
if (!testResult) { |
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
71 |
throw new RuntimeException("Test fails!"); |
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
72 |
} |
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
73 |
} |
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
74 |
|
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
75 |
private static void createUI() { |
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
76 |
|
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
77 |
final JFrame mainFrame = new JFrame("Metal L&F icons test"); |
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
78 |
GridBagLayout layout = new GridBagLayout(); |
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
79 |
JPanel mainControlPanel = new JPanel(layout); |
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
80 |
JPanel resultButtonPanel = new JPanel(layout); |
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
81 |
|
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
82 |
GridBagConstraints gbc = new GridBagConstraints(); |
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
83 |
|
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
84 |
JTextArea instructionTextArea = new JTextArea(); |
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
85 |
instructionTextArea.setText(INSTRUCTIONS); |
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
86 |
instructionTextArea.setEditable(false); |
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
87 |
instructionTextArea.setBackground(Color.white); |
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
88 |
|
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
89 |
gbc.gridx = 0; |
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
90 |
gbc.gridy = 0; |
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
91 |
gbc.fill = GridBagConstraints.HORIZONTAL; |
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
92 |
mainControlPanel.add(instructionTextArea, gbc); |
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
93 |
|
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
94 |
JButton passButton = new JButton("Pass"); |
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
95 |
passButton.setActionCommand("Pass"); |
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
96 |
passButton.addActionListener((ActionEvent e) -> { |
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
97 |
testResult = true; |
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
98 |
mainFrame.dispose(); |
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
99 |
countDownLatch.countDown(); |
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
100 |
|
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
101 |
}); |
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
102 |
|
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
103 |
JButton failButton = new JButton("Fail"); |
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
104 |
failButton.setActionCommand("Fail"); |
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
105 |
failButton.addActionListener(new ActionListener() { |
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
106 |
@Override |
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
107 |
public void actionPerformed(ActionEvent e) { |
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
108 |
mainFrame.dispose(); |
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
109 |
countDownLatch.countDown(); |
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
110 |
} |
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
111 |
}); |
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
112 |
|
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
113 |
gbc.gridx = 0; |
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
114 |
gbc.gridy = 0; |
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
115 |
resultButtonPanel.add(passButton, gbc); |
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
116 |
|
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
117 |
gbc.gridx = 1; |
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
118 |
gbc.gridy = 0; |
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
119 |
resultButtonPanel.add(failButton, gbc); |
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
120 |
|
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
121 |
gbc.gridx = 0; |
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
122 |
gbc.gridy = 1; |
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
123 |
mainControlPanel.add(resultButtonPanel, gbc); |
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
124 |
|
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
125 |
mainFrame.add(mainControlPanel); |
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
126 |
mainFrame.pack(); |
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
127 |
|
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
128 |
mainFrame.addWindowListener(new WindowAdapter() { |
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
129 |
|
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
130 |
@Override |
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
131 |
public void windowClosing(WindowEvent e) { |
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
132 |
mainFrame.dispose(); |
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
133 |
countDownLatch.countDown(); |
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
134 |
} |
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
135 |
}); |
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
136 |
mainFrame.setVisible(true); |
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
137 |
} |
49d6193f196f
8160986: Bad rendering of Swing UI controls with Metal L&F on HiDPI display
alexsch
parents:
diff
changeset
|
138 |
} |