Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / GUI / November 2003

Tip: Looking for answers? Try searching our database.

JButton/JMenuItem Action & JTree

Thread view: 
Rui Pacheco - 05 Nov 2003 12:36 GMT
Hi everyone

I have an object that creates a JToolBar with a couple of buttons,
another object creating a JMenuBar with a couple of JMenuItems and
finally an object creating a JTree.
One of the buttons on the toolbar and one of the menu items on the
menu bar share the same action - they obviously do the same thing. I
want them to create a new node on the JTree.

But how can I make the Action class communicate with the JTree object?

Thanks
Rui Pacheco
Antti S. Brax - 05 Nov 2003 12:50 GMT
ruipacheco@hotmail.com wrote in comp.lang.java.gui:
> But how can I make the Action class communicate with the JTree object?

    Your Action-object must have a reference to the JTree.

Signature

Antti S. Brax - asb(at)iki.fi   Rullalautailu pitää lapset poissa ladulta
  http://www.iki.fi/asb/          http://www.cs.helsinki.fi/u/abrax/hlb/



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.