Name: ssT124754 Date: 02/07/2001
java version "1.3.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-C)
Java HotSpot(TM) Client VM (build 1.3.0-C, mixed mode)
I experienced a problem using the JButton.
Without thinking I used following two
functions, which did not work.
public void javax.swing.Jbutton.disable()
public void javax.swing.Jbutton.enable()
java.lang.Object
|
+--java.awt.Component
|
+--java.awt.Container
|
+--javax.swing.JComponent
|
+--javax.swing.AbstractButton
|
+--javax.swing.JButton
I traced the problem, the javax.swing.JComponent.enable()
function overides the java.awt.Component.enable() function.
These functions are Deprecated.
void java.awt.Component.disable()
Deprecated. As of JDK version 1.1, replaced by setEnabled(boolean).
void java.awt.Component.enable()
Deprecated. As of JDK version 1.1, replaced by setEnabled(boolean).
void java.awt.Component.enable(boolean b)
Deprecated. As of JDK version 1.1, replaced by setEnabled(boolean).
I used the replacement function which worked fin.
void javax.swing.AbstractButton.setEnabled(boolean b)
(Review ID: 116506)
======================================================================