-
Bug
-
Resolution: Duplicate
-
P3
-
None
-
1.4.0
-
generic
-
generic
Name: jbT81659 Date: 05/17/2001
OS: RedHat Linux6.2, Solaris6-7-8 Intel/Sparc
Tested JDK:1.4.0-b64
Swing Component: JComboPanel
After executing the JComboPanel example, pressing the "PageUp" Button on the keyboard
-while the first item in the JComboPanrel is highlighted- causes the JVM to throw the
following error "Java.Lang.StackOverFlow Error"
Here is part of Error message diplayed on the bash prompt:
===================
java.lang.StackOverflowError
at java.awt.KeyboardFocusManager.getCurrentKeyboardFocusManager(KeyboardFocusManager.java:116)
at java.awt.Window.getFocusTraversalKeys(Window.java:1276)
at java.awt.Component.getFocusTraversalKeys_NoIDCheck(Component.java:5608)
at java.awt.Container.getFocusTraversalKeys(Container.java:2216)
at java.awt.Component.getFocusTraversalKeys_NoIDCheck(Component.java:5608)
at java.awt.Container.getFocusTraversalKeys(Container.java:2216)
at java.awt.Component.getFocusTraversalKeys_NoIDCheck(Component.java:5608)
at java.awt.Container.getFocusTraversalKeys(Container.java:2216)
at java.awt.Component.getFocusTraversalKeys_NoIDCheck(Component.java:5608)
at java.awt.Container.getFocusTraversalKeys(Container.java:2216)
at java.awt.DefaultKeyboardFocusManager.processKeyEvent(DefaultKeyboardFocusManager.java:726)
at java.awt.Component.dispatchEventImpl(Component.java:3400)
at java.awt.Container.dispatchEventImpl(Container.java:1399)
at java.awt.Component.dispatchEvent(Component.java:3343)
at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1514)
at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:572)
at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:689
)
at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:627
)
at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:544)
at java.awt.Component.dispatchEventImpl(Component.java:3367)
at java.awt.Container.dispatchEventImpl(Container.java:1399)
at java.awt.Component.dispatchEvent(Component.java:3343)
at javax.swing.plaf.basic.BasicComboBoxUI$KeyToListDispatcher.actionPerformed(BasicComboBoxUI.ja
va:1408)
at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1496)
at javax.swing.JComponent.processKeyBinding(JComponent.java:2361)
at javax.swing.JComponent.processKeyBindings(JComponent.java:2407)
at javax.swing.JComponent.processKeyEvent(JComponent.java:2314)
at javax.swing.JComboBox.processKeyEvent(JComboBox.java:1340)
at java.awt.Component.processEvent(Component.java:4744)
at java.awt.Container.processEvent(Container.java:1337)
at java.awt.Component.dispatchEventImpl(Component.java:3476)
at java.awt.Container.dispatchEventImpl(Container.java:1399)
at java.awt.Component.dispatchEvent(Component.java:3343)
at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1514)
at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:572)
===================
To reproduce bug:
1- Compile the following code (jComboPanel) and exute under Solaris(Sparc/intel-6,7,8) or RedHat 6.2
2- Note that the following warning is displayed:
=====================
May 17, 2001 12:06:21 PM java.util.prefs.FileSystemPreferences syncWorld
WARNING: Couldn't flush user prefs: java.util.prefs.BackingStoreException: Couldn't get file lock.Ma
y 17, 2001 12:06:51 PM java.util.prefs.FileSystemPreferences syncWorld
WARNING: Couldn't flush user prefs: java.util.prefs.BackingStoreException: Couldn't get file lock.Ma
y 17, 2001 12:07:21 PM java.util.prefs.FileSystemPreferences syncWorld
WARNING: Couldn't flush user prefs: java.util.prefs.BackingStoreException: Couldn't get file lock.
==============
3- When JComboPanel is displayed on screen use mouse or Spacebar to open it
4- Use mouse or arrows to move between JComboPanel items.
5- Note that No errors are displayed on the prompt
6- Select (But do not click on) first choice in JComboPane
7- Press the "PageUp" on your keyboard (or keypad)
8- If error is not displayed yet press the "PageUp" button again
9- Verify that java.lang.StackOverFlow error is displayed
==========Code==============
/* Copyright (c) Sun Microsystems 1998
$Header: /home-bazelet/sun/src/JDK1.4/standard/jComboPanel.java,v 1.1 2001/05/04 07:12:46 isam Exp $
*/
import java.awt.*;
import java.awt.event.*;
import java.util.*;
import javax.swing.*;
public class jComboPanel extends JApplet
{
public void init()
{
EditableComboBox combbox = new EditableComboBox();
getContentPane().add(combbox);
getContentPane().setSize(10,10);
}
public static void main(String[] argv)
{
JFrame frame = new JFrame("\u0645\u062b\u0627\u0644");
frame.setContentPane(new EditableComboBox());
frame.pack();
frame.addWindowListener( new WindowAdapter()
{
public void windowClosing( WindowEvent e)
{
System.exit(0);
}
});
frame.setVisible(true);
}
}
class EditableComboBox extends JPanel
{
String title[] =
{
"\u062a\u0641\u0627\u062d\u0020\u0623\u062d\u0645\u0631\u0020\u0643\u0628\u064a\u0631\u0020\u0042\u0049\u0047\u0020\u0052\u0045\u0044\u0020\u0041\u0050\u0050\u004c\u0045\u0053",
"\u0647\u0630\u0627\u0020\u064a\u0648\u0645\u0020\u0644\u0637\u064a\u0641\u0020\u05d6\u05d4\u0020\u05d9\u05d5\u05dd\u0020\u05e0\u05e2\u05d9\u05dd",
"\u05d6\u05d5\u0020\u05e9\u05e0\u05d4\u0020\u05d9\u05e4\u05d4\u0020\u0054\u0048\u0045\u0020\u0059\u0045\u0041\u0052\u0020\u0031\u0039\u0035\u0038",
"\u05d6\u05d5\u0020\u05e9\u05e0\u05d4\u0020",
"\u05ea\u05e4\u05d5\u05d6\u05d9\u05dd\u0020\u05d8\u05e2\u05de\u05d9\u05dd\u0020\u006c\u0069\u006d\u0065\u0020\u0069\u0073\u0020\u0067\u0072\u0065\u0065\u006e",
"\u006c\u0069\u006d\u0065\u0020\u0069\u0073\u0020\u0067\u0072\u0065\u0065\u006e\u05d7\u05d5\u05de\u05d5\u05e1\u0020\u05d9\u05e7\u05e8",
"\u006c\u0069\u006d\u0065\u0020\u05d7\u05d5\u05de\u05d5\u05e1\u0020\u05d9\u05e7\u05e8\u0069\u0073\u0020\u0067\u0072\u0065\u0065\u006e",
"\u05d7\u05d5\u05de\u05d5\u05e1\u0020\u006c\u0069\u006d\u0065\u0020\u0069\u0073\u0020\u0067\u0072\u0065\u0065\u006e\u0020\u05d9\u05e7\u05e8",
"\u062a\u0641\u0627\u062d\u0020\u0623\u062d\u0645\u0631\u0020\u0643\u0628\u064a\u0631",
"\u0648\u0644\u062f\u0020\u0635\u063a\u064a\u0631\u0020\u006c\u0069\u006d\u0065\u0020\u0069\u0073\u0020\u0067\u0072\u0065\u0065\u006e\u0020\u0648\u062c\u0645\u064a\u0644"
};
public EditableComboBox()
{
super(true);
setLayout(new BorderLayout());
JComboBox bookCombo = new JComboBox(title);
bookCombo.setFont(new Font("Lucida Sans Regular", Font.PLAIN, 14));
bookCombo.setSize(20,200);
add(bookCombo, BorderLayout.CENTER);
}
}
============================
======================================================================
- duplicates
-
JDK-4470004 REGRESSION: PageUp/PageDown in JComboBox causes stack overflow
- Closed