bug-classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug-classpath] [bug #13610] swing: StringIndexOutOfBoundsException with


From: anonymous
Subject: [bug-classpath] [bug #13610] swing: StringIndexOutOfBoundsException with JTabbedPane.setMnemonicAt
Date: Sat, 2 Jul 2005 15:49:37 +0000
User-agent: Elinks

URL:
  <http://savannah.gnu.org/bugs/?func=detailitem&item_id=13610>

                 Summary: swing: StringIndexOutOfBoundsException with
JTabbedPane.setMnemonicAt
                 Project: classpath
            Submitted by: None
            Submitted on: Sat 07/02/05 at 11:49
                Category: classpath
                Severity: 3 - Normal
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
        Platform Version: None

    _______________________________________________________

Details:

Steps to reproduce:
1. Compile and run the attached testcase.

Expected results:
1. An empty window shows up.

Actual results:
1. No window is shown and the program throws the following exception:
Exception during event dispatch:
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
   at java.lang.String.charAt (String.java:548)
   at javax.swing.JTabbedPane$Page.setDisplayedMnemonicIndex
(JTabbedPane.java:526)
   at javax.swing.JTabbedPane$Page.setMnemonic (JTabbedPane.java:499)
   at javax.swing.JTabbedPane$Page.setMnemonic (JTabbedPane.java:486)
   at javax.swing.JTabbedPane.setMnemonicAt (JTabbedPane.java:1361)
   at com.cep.jqemu.JQEMU.<init> (JQEMU.java:59)
   at com.cep.jqemu.JQEMU$5.run (JQEMU.java:252)
   at java.awt.event.InvocationEvent.dispatch (InvocationEvent.java:191)
   at java.awt.EventQueue.dispatchEvent (EventQueue.java:508)
   at java.awt.EventDispatchThread.run (EventDispatchThread.java:75)

Testcase:
import javax.swing.*;
import java.awt.*;
public class testcase extends JFrame {
        public static void main(String[] args) {
                (new testcase()).show();
        }
        public testcase() {
                JTabbedPane configPane = new JTabbedPane();
                JPanel stdPanel = new JPanel();
                configPane.addTab("Standard", stdPanel);
                configPane.setMnemonicAt(0, '1');
                this.setSize(new Dimension(400,400));
        }
}

This testcase has been reduced from JQEMU available at
http://sourceforge.net/projects/jqemu/







    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?func=detailitem&item_id=13610>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]