Using JTree properly

  2 posts   Feedicon  
Replies: 1 - Last Post: February 07, 2010 16:28
by: Logan Barnett
showing 1 - 2 of 2
 
Posted: February 07, 2010 00:10 by peon374
I have a Jtree with branch and leaf models.

Double clicking on a node I would like to launch the controller for that node.

I have the model and through a lookup I have the controller, how do I launch the controller with a specific model?
 
Posted: February 07, 2010 16:28 by Logan Barnett

Can you make your controller hold a reference to the node? When you call open, pass in the node. Accept the node on the load method (via a param). You may have to delegate between your controller's model and the node. This may help reduce pain later, as something like a Swing tree node might require constructor params. This can make calls to view_state/view_model difficult.

Replies: 1 - Last Post: February 07, 2010 16:28
by: Logan Barnett
  • Mysql
  • Glassfish
  • Jruby
  • Rails
  • Nblogo
Terms of Use; Privacy Policy;
© 2014, Oracle Corporation and/or its affiliates
(revision 20160708.bf2ac18)
 
 
Close
loading
Please Confirm
Close