20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 import com.sun.java.swing.plaf.windows.WindowsComboBoxUI.WindowsComboBoxEditor;
25 import java.awt.Toolkit;
26 import java.awt.event.ItemEvent;
27 import java.awt.event.ItemListener;
28 import javax.swing.ComboBoxEditor;
29 import javax.swing.JComboBox;
30 import javax.swing.JFrame;
31 import javax.swing.JTextField;
32 import javax.swing.UIManager;
33
34 import static javax.swing.SwingUtilities.invokeAndWait;
35 import static javax.swing.SwingUtilities.windowForComponent;
36 import static javax.swing.WindowConstants.DISPOSE_ON_CLOSE;
37
38 /*
39 * @test
40 * @bug 8015300
41 * @summary Tests that editable combobox select all text
42 * @author Sergey Malenkov
43 * @library ../../../../lib/testlibrary/
44 * @modules java.desktop/com.sun.java.swing.plaf.windows
45 * @build ExtendedRobot
46 * @run main Test8015300
47 */
48
49 public class Test8015300 {
50 private static final ExtendedRobot robot = createRobot();
51 private static final String[] ITEMS = {
52 "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M",
53 "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"};
54
55 private static JComboBox<String> combo;
56
57 public static void main(String[] args) throws Exception {
58 UIManager.LookAndFeelInfo[] array = UIManager.getInstalledLookAndFeels();
59 for (UIManager.LookAndFeelInfo info : array) {
60 UIManager.setLookAndFeel(info.getClassName());
61 System.err.println("L&F: " + info.getName());
|
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 import com.sun.java.swing.plaf.windows.WindowsComboBoxUI.WindowsComboBoxEditor;
25 import java.awt.Toolkit;
26 import java.awt.event.ItemEvent;
27 import java.awt.event.ItemListener;
28 import javax.swing.ComboBoxEditor;
29 import javax.swing.JComboBox;
30 import javax.swing.JFrame;
31 import javax.swing.JTextField;
32 import javax.swing.UIManager;
33
34 import static javax.swing.SwingUtilities.invokeAndWait;
35 import static javax.swing.SwingUtilities.windowForComponent;
36 import static javax.swing.WindowConstants.DISPOSE_ON_CLOSE;
37
38 /*
39 * @test
40 * @key headful
41 * @bug 8015300
42 * @summary Tests that editable combobox selects all text.
43 * @author Sergey Malenkov
44 * @library ../../../../lib/testlibrary/
45 * @modules java.desktop/com.sun.java.swing.plaf.windows
46 * @build ExtendedRobot
47 * @run main Test8015300
48 */
49
50 public class Test8015300 {
51 private static final ExtendedRobot robot = createRobot();
52 private static final String[] ITEMS = {
53 "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M",
54 "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"};
55
56 private static JComboBox<String> combo;
57
58 public static void main(String[] args) throws Exception {
59 UIManager.LookAndFeelInfo[] array = UIManager.getInstalledLookAndFeels();
60 for (UIManager.LookAndFeelInfo info : array) {
61 UIManager.setLookAndFeel(info.getClassName());
62 System.err.println("L&F: " + info.getName());
|