I have set up a gui interface and added some buttons like below
Button programmeDataButton = new Button("Program Data");
When someone clicks on this buttton i want it to display the following
if (buttonName.equals("List Programmes"))
progs.setBounds(20, 140, 550, 400);
Which works fine.
The thing i wanted to know is how I can then say, the next time someone clicks on that button the "progs" is removed i.e. remove(progs);
At the moment I have added another button within the above code called "done" and when this is clicked it removes "progs" but I wanted to know whether there was a way do do it on the second click of the initial button!