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 / General / February 2007

Tip: Looking for answers? Try searching our database.

Problem with actions & swing

Thread view: 
Allan Valeriano - 16 Feb 2007 19:57 GMT
Hi, I'm having a little problem with swing components and actions.
I have 1 action which is shared by 2 swing components (1 menu and 1
popUpMenu). Both of them work over a Tree to do something when a node
is selected.
The problem is that the popUpMenu is getting messed up when I select a
tree node while the menu is working fine, so when I select a node, the
menu is available, but the popUpMenu isn't.
Does anybody knows why is it happening? Maybe 2 swing components
cannot use the same action...

thanks in advance
Allan Valeriano
Andrew Thompson - 16 Feb 2007 20:33 GMT
> Hi, I'm having a little problem with swing components and actions.

Where is your little SSCCE?
<http://www.physci.org/codes/sscce/>

Andrew T.
Daniel Pitts - 17 Feb 2007 00:55 GMT
> Hi, I'm having a little problem with swing components and actions.
> I have 1 action which is shared by 2 swing components (1 menu and 1
[quoted text clipped - 8 lines]
> thanks in advance
> Allan Valeriano

The only advice I can give without you providing an sscce (Andrew
provides you a link):

Make sure you're following the Swing "Single Thread" policy and only
modifying your action from within the EDT, eg with
SwingUtilities.invokeLater().


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.