[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug classpath/23027] JToggleButton isnt correctly showing its informati
From: |
gcc-bugzilla at gcc dot gnu dot org |
Subject: |
[Bug classpath/23027] JToggleButton isnt correctly showing its information on paramString (fix included) |
Date: |
8 Sep 2010 18:04:52 -0000 |
The following testcase shows that JToggleButton has a wrong output if we make a
e.getSource() on a event that has been triggered by a JToggleButton.
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class testcase extends JFrame implements ActionListener {
public static void main(String[] args) {
new testcase().show();
}
public testcase() {
JToggleButton asdf = new JToggleButton("asdf");
this.add(asdf);
asdf.addActionListener(this);
this.setSize(new Dimension(400, 400));
}
public void actionPerformed(ActionEvent e) {
System.out.println("actionPerformed,adsf="
+ e.getSource());
}
}
To solce this, in the class javax.swing.JToggleButton the following change has
to be made:
change this method:
protected String paramString()
{
return "JToggleButton";
}
to this one:
protected String paramString()
{
return super.paramString();
}
------- Comment #1 from from-classpath at savannah dot gnu dot org 2005-07-14
23:12 -------
Duplicate of bug #13695 which is already fixed (will be release with 0.17).
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23027
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Bug classpath/23027] JToggleButton isnt correctly showing its information on paramString (fix included),
gcc-bugzilla at gcc dot gnu dot org <=