wood burning stoves*
The moose likes Swing / AWT / SWT and the fly likes Doubt using JButton Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Doubt using JButton" Watch "Doubt using JButton" New topic
Author

Doubt using JButton

Harini Kaushik
Greenhorn

Joined: Aug 08, 2008
Posts: 15
I have 3 buttons Each of which on clicking would give the label of corresponding button name and a Back Button which on clicking would go through all the label names of the buttons which are clicked previously each time it is clicked.
How to give the functionality for Back Button listener?

Appreciate any help!!
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38007
    
  22
How about pushing the names onto a stack when the buttons are clicked, then popping them when the other button is pressed?
Harini Kaushik
Greenhorn

Joined: Aug 08, 2008
Posts: 15
Actually I tried using ArrayList and it dint work out properly.
I could do that now with Stack.Thanks a lot Campbell.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Doubt using JButton
 
Similar Threads
Actionevent
Submit buttons within table rows...
GUI
Which Container should I use?
multiple submit buttons