This week's book giveaway is in the Design forum.
We're giving away four copies of Building Microservices and have Sam Newman on-line!
See this thread for details.
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

Win a copy of Building Microservices this week in the Design forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Doubt using JButton" Watch "Doubt using JButton" New topic

Doubt using JButton

Harini Kaushik

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

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

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’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: Doubt using JButton
It's not a secret anymore!