Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4243930

The JToolBar.remove() method throws StackOverflowError.

XMLWordPrintable

    • beta
    • sparc
    • solaris_2.5.1



      Name: aaC67449 Date: 06/04/99



      The JToolBar.remove() method throws StackOverflowError.

      See example:

      ----------------- example -----------
      import javax.swing.*;
      import java.awt.event.*;

      public class Test {
       
           public static void main(String argv[]) {
                JToolBar c = new JToolBar();
      JButton test = c.add(new MyAction());
      c.remove(test);
      System.out.println("Ok");


           }
      }

      class MyAction extends AbstractAction {
       
           public void actionPerformed(ActionEvent e){}
      }
      -------------- jdk1.3 output -----------
      Exception in thread "main" java.lang.StackOverflowError
              at java.awt.Container.remove(Container.java, Compiled Code)
              at javax.swing.JToolBar.remove(JToolBar.java, Compiled Code)
              at javax.swing.JToolBar.remove(JToolBar.java, Compiled Code)
              at java.awt.Container.remove(Container.java, Compiled Code)
              at javax.swing.JToolBar.remove(JToolBar.java, Compiled Code)
              at javax.swing.JToolBar.remove(JToolBar.java, Compiled Code)
              at java.awt.Container.remove(Container.java, Compiled Code)
              at javax.swing.JToolBar.remove(JToolBar.java, Compiled Code)
              at javax.swing.JToolBar.remove(JToolBar.java, Compiled Code)
      ...

      ======================================================================

            gsaab Georges Saab
            alisunw Ali Ali (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: