[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug classpath/23033] Swing: ActionCommand and paramString broken in mos
From: |
gcc-bugzilla at gcc dot gnu dot org |
Subject: |
[Bug classpath/23033] Swing: ActionCommand and paramString broken in most buttions, with fix |
Date: |
8 Sep 2010 18:04:54 -0000 |
Most classes that are childs of AbstractButton(or are childs of a child...)
implement the fonction paramString wrong.
They implement it like this:
protected String paramString()
{
return "NameOfClass";
}
but they should implement it like this:
protected String paramString()
{
return super.paramString();
}
and also the ActionCommand is wrong for nearly every Button.
They need a setActionCommand(text);
Put it in the init() if there is one, and if there is none, put it in the
constructor.
Take care that sometimes, a class like JRadioButton calls the constructor of
JToggleButton where we already have a setActionCommand(text); (at least there
should be one if the fix of my other bugreport is applied), so there is no need
for anoterh setActionCommand(text); in JRadioButton.
------- Comment #1 from from-classpath at savannah dot gnu dot org 2005-07-13
00:27 -------
Although the current implementation of paramString() is working correct
according to the spec(
http://java.sun.com/j2se/1.5.0/docs/api/javax/swing/JCheckBox.html#paramString()
and
http://developer.classpath.org/doc/javax/swing/JCheckBox.html#paramString())
I agree that "JCheckBox" is not of much use for practical debugging sessions.
The patch I committed fixes the issue in JToggleButton, JButton and JCheckBox.
For the last two I added more property information to them.
------- Comment #2 from from-classpath at savannah dot gnu dot org 2005-07-13
01:05 -------
I discuss the remaining problem in bug #13691 and close it because the
paramString() issue is solved now.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23033
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Bug classpath/23033] Swing: ActionCommand and paramString broken in most buttions, with fix,
gcc-bugzilla at gcc dot gnu dot org <=