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 / March 2008

Tip: Looking for answers? Try searching our database.

editing nodes in JTree, icon problem

Thread view: 
Ender - 23 Feb 2008 19:37 GMT
I have a JTree with a child node that has a dropdown list in it. When I
click on the node to make the list appear, then make a selection, the
icon changes to what looks like a document icon.

My problem is that the document icon stays there after I make the
selection in the dropdown list until I click on another node. It's like
the process of making a selection is unfinished.

Anyone know what that is?
John - 26 Feb 2008 16:44 GMT
Ender a écrit :
> I have a JTree with a child node that has a dropdown list in it. When I
> click on the node to make the list appear, then make a selection, the
[quoted text clipped - 5 lines]
>
> Anyone know what that is?

The combo box is still in editing state when you select a value. You could add an action listener to the combo box (problem for reselecting the same value) and stop the editing when you receive an action event.
Ender - 06 Mar 2008 16:41 GMT
> Ender a écrit :
>> I have a JTree with a child node that has a dropdown list in it. When I
[quoted text clipped - 10 lines]
> could add an action listener to the combo box (problem for reselecting
> the same value) and stop the editing when you receive an action event.

That's what I actually have. I have an ActionListener tied to this
JComboBox in the JTree node and in the ActionListener, I have a
stopCellEditing() call, but before and after that call I put an
isEditing() to see if it was in editing state and it returns false.

But if I click on another node after making the selection, then the
icon returns to it's normal icon; otherwise, the icon is the editing
doc icon after I make a selection and before I click on anything else.


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.