This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
[gui] Patch: javax.swing.JButton
- From: Michael Koch <konqueror at gmx dot de>
- To: java-patches at gcc dot gnu dot org
- Date: Fri, 18 Jun 2004 17:33:40 +0200
- Subject: [gui] Patch: javax.swing.JButton
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi list,
I just commited the attached patch to fix javax.swing.JButton a bit.
Michael
2004-06-18 Michael Koch <konqueror@gmx.de>
* javax/swing/JButton.java
(removeNotify): Fixed javadoc.
(updateUI): Simplified.
- --
Homepage: http://www.worldforge.org/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
iD8DBQFA0wtUWSOgCCdjSDsRAimKAKCQ3vujT6+joXHimVNHYEuWiAYvjgCgig+m
1Gd9w78aSdVg2+kQMGHBlnY=
=vjRe
-----END PGP SIGNATURE-----
Index: javax/swing/JButton.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/javax/swing/JButton.java,v
retrieving revision 1.4.2.2
diff -u -b -B -r1.4.2.2 JButton.java
--- javax/swing/JButton.java 18 Jun 2004 10:23:14 -0000 1.4.2.2
+++ javax/swing/JButton.java 18 Jun 2004 15:29:47 -0000
@@ -120,9 +120,14 @@
return "JButton";
}
+ /**
+ * Overrides JComponent.removeNotify to check if this button is currently
+ * set as the default button on the RootPane, and if so, sets the RootPane's
+ * default button to null to ensure the RootPane doesn't hold onto an invalid
+ * button reference.
+ */
public void removeNotify()
{
- //Overrides JComponent.removeNotify to check if this button is currently set as the default button on the RootPane, and if so, sets the RootPane's default button to null to ensure the RootPane doesn't hold onto an invalid button reference.
}
public void setDefaultCapable(boolean defaultCapable)
@@ -132,7 +137,6 @@
public void updateUI()
{
- ButtonUI b = (ButtonUI) UIManager.getUI(this);
- setUI(b);
+ setUI((ButtonUI) UIManager.getUI(this));
}
}