I have an issue, I have a method which is an action performed. If the checkbox is ticked then additional fields become available. If not ticked then they are greyed out. So basically what I want is to add to this method. I have a first condition and now need to add a second condition to it. I pasted the code snippet below, basically what I need is to put it into an if else, but I get some errors. Any advise is much appreciated.
public void actionPerformed(ActionEvent e) {
boolean sel = _useSSL.isSelected();
_port.setUseSSL(sel);
_keystore.setEnabled(sel);
_passphrase.setEnabled(sel);
L_KEYSTORE.setEnabled(sel);
L_PASSPHRASE.setEnabled(sel);
}
Above is the working method, Now I need to add in if _truststore.isSelected(); then execute something else
How can I add in this second Boolean condition to the method ?
Aucun commentaire:
Enregistrer un commentaire