• Post Reply Bookmark Topic Watch Topic
  • New Topic

gui design pattern question

 
Dorren Chen
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Making a bookmark manager, just like the one in firefox.

Currently in the main JFrame, I have folder tree at the left, and bookmark list at right side. I have a list of editing buttons on the top, like copy, paste, delete, which apply to either folder or bookmark, depends on which one is selected/highlighted.

how do I implement those button actionlistener, so i don't have to put in a big if loop in every button to check what's the current selected item? later on those same button can apply to other objects, like to-do list entry. I don't want those buttons to be a nightmare to maintain. Ideally the buttons don't have to be modified at all and still can operate on new editable objects. Thanks.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!