File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
Win a copy of Soft Skills: The software developer's life manual this week in the Jobs Discussion forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Informing other components about events in a JTree

Mark Malkiewicz
Posts: 5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've written a presenter class that contains a JTree so It sets up the tree, attaches model, CellRenderer, etc.

The problem is that the presenter should allow to connect other components to itself that are interested in tree events (like when a node is selected).
It's like Observator programming pattern (where the presenter is subject) , although I don't want to use java.util.Observable class but make it simpler. Like handling events in standard Swing components.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic