-
Bug
-
Resolution: Fixed
-
P3
-
1.4.1
-
mantis
-
x86
-
windows_nt, windows_2000
Name: rmT116609 Date: 08/15/2002
FULL PRODUCT VERSION :
java version "1.4.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-b92)
Java HotSpot(TM) Client VM (build 1.4.0-b92, mixed mode)
and:
java version "1.4.1-beta"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1-beta-b14)
Java HotSpot(TM) Client VM (build 1.4.1-beta-b14, mixed mode)
FULL OPERATING SYSTEM VERSION :
4NT 3.02B Windows NT 5.00
A DESCRIPTION OF THE PROBLEM :
While in a JTextArea, or potentially any other control, if the user presses Ctrl+Space, while using the "Windows" LAF, to bring up the system menu, it reports an error.
REGRESSION. Last worked in version 1.3.1_04
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Compile and Run the attached code
2. Press Ctrl+Space while in the text area
3. See the error
EXPECTED VERSUS ACTUAL BEHAVIOR :
Actual:
It errors
Expected:
The system menu of the internal frame should appear.
ERROR MESSAGES/STACK TRACES THAT OCCUR :
java.lang.NullPointerException
at javax.swing.plaf.basic.BasicInternalFrameTitlePane.showSystemMenu
(BasicInternalFrameTitlePane.java:253)
at javax.swing.plaf.basic.BasicInternalFrameUI$1.actionPerformed
(BasicInternalFrameUI.java:153)
at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1502)
at javax.swing.JComponent.processKeyBinding(JComponent.java:2422)
at javax.swing.KeyboardManager.fireBinding(KeyboardManager.java:253)
at javax.swing.KeyboardManager.fireKeyboardAction
(KeyboardManager.java:202)
at javax.swing.JComponent.processKeyBindingsForAllComponents
(JComponent.java:2499)
at javax.swing.JComponent.processKeyBindings(JComponent.java:2491)
at javax.swing.JComponent.processKeyEvent(JComponent.java:2385)
at java.awt.Component.processEvent(Component.java:4830)
at java.awt.Container.processEvent(Container.java:1525)
at java.awt.Component.dispatchEventImpl(Component.java:3526)
at java.awt.Container.dispatchEventImpl(Container.java:1582)
at java.awt.Component.dispatchEvent(Component.java:3367)
at java.awt.KeyboardFocusManager.redispatchEvent
(KeyboardFocusManager.java:1700)
at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent
(DefaultKeyboardFocusManager.java:568)
at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent
(DefaultKeyboardFocusManager.java:740)
at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions
(DefaultKeyboardFocusManager.java:673)
at java.awt.DefaultKeyboardFocusManager.dispatchEvent
(DefaultKeyboardFocusManager.java:534)
at java.awt.Component.dispatchEventImpl(Component.java:3396)
at java.awt.Container.dispatchEventImpl(Container.java:1582)
at java.awt.Window.dispatchEventImpl(Window.java:1581)
at java.awt.Component.dispatchEvent(Component.java:3367)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:445)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy
(EventDispatchThread.java:191)
at java.awt.EventDispatchThread.pumpEventsForHierarchy
(EventDispatchThread.java:144)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:130)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:98)
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class Frame1 extends JFrame {
JDesktopPane desktop = new JDesktopPane();
JInternalFrame jif = new JInternalFrame("Internal Frame", true, false,
true, true);
//Construct the frame
public Frame1() {
enableEvents(AWTEvent.WINDOW_EVENT_MASK);
setTitle("Frame Title");
jif.setBounds(10, 10, 200, 100);
jif.getContentPane().add(new JTextArea());
jif.setVisible(true);
desktop.add(jif);
getContentPane().add(desktop);
addWindowListener(new WindowAdapter() {
public void windowOpened(WindowEvent e) {
try {
jif.setSelected(true);
}
catch (Exception ex) {}
}
});
setBounds(0, 0, 300, 300);
setVisible(true);
}
protected void processWindowEvent(WindowEvent e) {
super.processWindowEvent(e);
if (e.getID() == WindowEvent.WINDOW_CLOSING) {
System.exit(0);
}
}
//Main method
public static void main(String[] args) {
try {
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
}
catch(Exception e) {
e.printStackTrace();
}
Frame1 frame = new Frame1();
}
}
---------- END SOURCE ----------
Release Regression From : 1.3.1_04
The above release value was the last known release where this
bug was known to work. Since then there has been a regression.
(Review ID: 160828)
======================================================================
- duplicates
-
JDK-4747555 1.4 REGRESSION: System Menu shortcut in JInternalFrame with Metal L&F causes NPE
- Closed
- relates to
-
JDK-4780917 JCK1.4a-runtime api/javax_swing/interactive/JToolTipTests.html#JToolTip fails
- Closed