Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Doubt using JButton

 
Harini Kaushik
Greenhorn
Posts: 15
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 47258
52
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic