73 import javax.swing.JTabbedPane;
74 import javax.swing.JTable;
75 import javax.swing.JTextArea;
76 import javax.swing.JTextField;
77 import javax.swing.JTextPane;
78 import javax.swing.JToggleButton;
79 import javax.swing.JToolBar;
80 import javax.swing.JTree;
81 import javax.swing.JViewport;
82 import javax.swing.JWindow;
83 import javax.swing.SwingUtilities;
84 import javax.swing.UIManager;
85 import javax.swing.UIManager.LookAndFeelInfo;
86 import javax.swing.UnsupportedLookAndFeelException;
87 import javax.swing.table.JTableHeader;
88
89 import static javax.swing.UIManager.getInstalledLookAndFeels;
90
91 /**
92 * @test
93 * @bug 6459798
94 * @author Sergey Bylokhov
95 */
96 public final class DimensionEncapsulation implements Runnable {
97
98 java.util.List<Component> failures = new ArrayList<>();
99
100 public static void main(final String[] args) throws Exception {
101 for (final LookAndFeelInfo laf : getInstalledLookAndFeels()) {
102 SwingUtilities.invokeAndWait(() -> setLookAndFeel(laf));
103 SwingUtilities.invokeAndWait(new DimensionEncapsulation());
104 }
105 }
106
107 @Override
108 public void run() {
109 runTest(new Panel());
110 runTest(new Button());
111 runTest(new Checkbox());
112 runTest(new Canvas());
|
73 import javax.swing.JTabbedPane;
74 import javax.swing.JTable;
75 import javax.swing.JTextArea;
76 import javax.swing.JTextField;
77 import javax.swing.JTextPane;
78 import javax.swing.JToggleButton;
79 import javax.swing.JToolBar;
80 import javax.swing.JTree;
81 import javax.swing.JViewport;
82 import javax.swing.JWindow;
83 import javax.swing.SwingUtilities;
84 import javax.swing.UIManager;
85 import javax.swing.UIManager.LookAndFeelInfo;
86 import javax.swing.UnsupportedLookAndFeelException;
87 import javax.swing.table.JTableHeader;
88
89 import static javax.swing.UIManager.getInstalledLookAndFeels;
90
91 /**
92 * @test
93 * @key headful
94 * @bug 6459798
95 * @author Sergey Bylokhov
96 */
97 public final class DimensionEncapsulation implements Runnable {
98
99 java.util.List<Component> failures = new ArrayList<>();
100
101 public static void main(final String[] args) throws Exception {
102 for (final LookAndFeelInfo laf : getInstalledLookAndFeels()) {
103 SwingUtilities.invokeAndWait(() -> setLookAndFeel(laf));
104 SwingUtilities.invokeAndWait(new DimensionEncapsulation());
105 }
106 }
107
108 @Override
109 public void run() {
110 runTest(new Panel());
111 runTest(new Button());
112 runTest(new Checkbox());
113 runTest(new Canvas());
|