< prev index next >
test/jdk/javax/swing/plaf/basic/BasicLabelUI/bug7172652.java
Print this page
rev 51542 : 8210039: move OSInfo to top level testlibrary
Reviewed-by: duke
*** 26,55 ****
* @key headful
* @bug 7172652
* @summary With JDK 1.7 text field does not obtain focus when using mnemonic Alt/Key combin
* @author Semyon Sadetsky
* @requires (os.family == "windows")
! * @library /lib/testlibrary
! * @build jdk.testlibrary.OSInfo
* @run main bug7172652
*/
import javax.swing.*;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import java.awt.*;
import java.awt.event.KeyEvent;
! import jdk.testlibrary.OSInfo;
public class bug7172652 {
private static JMenu menu;
private static JFrame frame;
private static Boolean selected;
public static void main(String[] args) throws Exception {
! if (OSInfo.getOSType() != OSInfo.OSType.WINDOWS) {
System.out.println("ok");
return;
}
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
SwingUtilities.invokeAndWait(new Runnable() {
--- 26,56 ----
* @key headful
* @bug 7172652
* @summary With JDK 1.7 text field does not obtain focus when using mnemonic Alt/Key combin
* @author Semyon Sadetsky
* @requires (os.family == "windows")
! * @library /test/lib
! * @build jdk.test.lib.Platform
* @run main bug7172652
*/
import javax.swing.*;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import java.awt.*;
import java.awt.event.KeyEvent;
!
! import jdk.test.lib.Platform;
public class bug7172652 {
private static JMenu menu;
private static JFrame frame;
private static Boolean selected;
public static void main(String[] args) throws Exception {
! if (!Platform.isWindows()) {
System.out.println("ok");
return;
}
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
SwingUtilities.invokeAndWait(new Runnable() {
< prev index next >