This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes Informing other components about events in a JTree Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Informing other components about events in a JTree" Watch "Informing other components about events in a JTree" New topic
Author

Informing other components about events in a JTree

Mark Malkiewicz
Greenhorn

Joined: Feb 16, 2013
Posts: 5
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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Informing other components about events in a JTree
 
Similar Threads
JTree
JTree - editing
JTree problem
JTree
JTree Selection Customization