refreshing my Buttons after executing an action
Hi,
I wonder what do I need to do to refresh my GUI scrollPanes everytime I execute an action. For example I have the code below:
Code:
purchaseButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
if (e.getActionCommand().equals("PURCHASE") && user != null && stationFrom != null && stationTo != null
&& startTime != null && endTime != null) {
else {
text.setText("PURCHASE SELECTED");
new buyJourneyforUser(user, stationFrom, stationTo, startTime, endTime, n1);
userList.setRequestFocusEnabled(false);
stationListFrom.setRequestFocusEnabled(true);
}
}
}
});
Then execute the buyJourneyforUser() but going back to the menu the same selection still on. What do I need to do to reset that back to non-selection. Thanks for your help in advance.