-
Bug
-
Resolution: Fixed
-
P3
-
1.4.0
-
beta
-
x86, sparc
-
generic, linux, solaris_2.6
-
Verified
Name: nkR10003 Date: 10/20/2000
Public static FocusManager.getCurrentManager() method throws
NullPointerExcption (NPE).
Example below demonstrates this problem:
------------------example--------------------
//test.java
import javax.swing.*;
public class test {
public static void main(String[] args) {
System.out.println("current manager: "
+ FocusManager.getCurrentManager());
System.out.println("Passed: OKAY");
System.exit(0);
}
}
----------------output:----------------------
Exception in thread "main" java.lang.NullPointerException
at javax.swing.DelegatingDefaultFocusManager.setDefaultFocusTraversalPolicy(FocusManager.java:172)
at javax.swing.DefaultFocusManager.<init>(DefaultFocusManager.java:41)
at javax.swing.DelegatingDefaultFocusManager.<init>(FocusManager.java:125)
at javax.swing.FocusManager.getCurrentManager(FocusManager.java:63)
at test.main(test.java:5)
---------------------------------------------
======================================================================
- duplicates
-
JDK-4392714 JCK: 2 api/javax_swing tests fail
- Closed