My Swing Questions Topic
i thought that id make 1 topic for all my questions instead of creating a topic each time i run into a problem. so far i only have 1 question but im sure ill have more later haha!
im having a few problems right now and i hope u guys could maybe help me:
1)
if(event.getSource() == editButton && editButton.getText() =="Edit"){
contactNameField.setEditable(true);
contactNumberField.setEditable(true);
contactEMailField.setEditable(true);
editButton.setText("Done");
}
if(event.getSource() == editButton && editButton.getText() =="Done"){
contactNameField.setEditable(false);
contactNumberField.setEditable(false);
contactEMailField.setEditable(false);
editButton.setText("Edit");
}
this doesnt want to work and i have no clue why. when i start my app up and click on the "Edit" button, nothing happens.
whats supposed to happen is this: the text fields are supposed to become editable, and editButton is supposed to change its button text to "Done". if i then click on editButton again, when its text is set to "Done", then the text fields are no longer editable and editButtons text changes back to "Edit"). and yea i have added an actionlistener to my button.

