classpath-patches
[Top][All Lists]
Advanced

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

[cp-patches] FYI: Patch for DefaultButtonModel relating to JToggleButton


From: Anthony Balkissoon
Subject: [cp-patches] FYI: Patch for DefaultButtonModel relating to JToggleButtons
Date: Tue, 12 Jul 2005 16:25:32 -0400

This patch fixes the problem discussed in the additional comments to bug
13683:


======additional comment #1==========
I have discovered another bug in this testcase. If you open a menu, you
can see in the taskbar that a new window with the name "." has been
opened. 
And also, on the sun vm if you click on the checkbox you have this
output in the console: 
JMenu is set to off 

but with classpath you get: 
JMenu is set to on 

Perhaps classpath first triggers a actionPerformed ActionEvent and only
afterwards changes the selection of the checkbox?

======additional comment #2==========
Indeed. I think something is wrong with our JCheckBox.

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


For classes whose ButtonModel is a JToggleButton.ToggleButtonModel we
fire action events after toggling the state of the button, not when the
button becomes unpressed.

Patch is attached.

2005-07-12  Anthony Balkissoon  <address@hidden>

* javax/swing/DefaultButtonModel.java:
(changeState): If the button is a JToggleButton fire action events
when it changes between (selected/unselected) not when it changes
from pressed to unpressed.  Fire action events after firing
ItemStateChanged events.


Attachment: JToggleButtonActionPerformed.diff
Description: Text Data


reply via email to

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