是继承了AbstractButton的方法:
addActionListener
public void addActionListener(ActionListener l)
adds an ActionListener to the button
addActionListener
public void addActionListener(ActionListener l)
adds an ActionListener to the button
if ( jRadioButtonnewname.isSelected())
{
jTextFieldnewname.setEnabled(true);
jComboBoxoldname.setEnabled(false);
}
if ( jRadioButtonoldname.isSelected())
{
jTextFieldnewname.setEnabled(false);
jComboBoxoldname.setEnabled(true);
}
用 jRadioButtonnewname_propertyChange