bug-classpath
[Top][All Lists]
Advanced

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

[Bug classpath/22865] [Swing] more then one JTextField cause actionMap l


From: gcc-bugzilla at gcc dot gnu dot org
Subject: [Bug classpath/22865] [Swing] more then one JTextField cause actionMap loop.
Date: 16 Oct 2005 01:27:30 -0000

In a Swing UI I have more then one JTextField on screen and if I call 
javax.swing.SwingUtilities.updateComponentTreeUI(myFrame);
it ends up in an endless loop on 
javax.swing.SwingUtilities.replaceUIActionMap(comp, actionmap) doing a
getParent on the map (line 1113 on current CVS).

Notice that this endless looping only happens on the from the updateUI of the
second JTextField on screen.

See the following runnable testcase that will never go past the
updateComponentTreeUI line. (tested in jamvm 1.2.4


import javax.swing.*;

public class Example2 extends JPanel {
    public Example2() {
        JTextField sName = new JTextField();
        JTextField sCity = new JTextField();
        add(sCity);
        add(sName);
    }
    public static void main(String[] args) {
       
System.getProperties().put("gnu.java.awt.peer.gtk.Graphics","Graphics2D");
        final JFrame f = new JFrame();
        JPanel p = new Example2();
        f.getContentPane().add(p);
        SwingUtilities.invokeLater(new Runnable() {
            public void run() {
                SwingUtilities.updateComponentTreeUI(f);
                f.setSize(new java.awt.Dimension(400, 500));
                f.setVisible(true);
            }
        });
    }
}


------- Comment #1 from from-classpath at savannah dot gnu dot org  2005-06-03 
10:02 -------
I've checked in a fix for that in Classpath CVS HEAD. Could you please retest
this?


------- Comment #2 from from-classpath at savannah dot gnu dot org  2005-07-13 
17:17 -------
Works for me for a while now. I'm close this bug.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22865





reply via email to

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