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

Tip: Looking for answers? Try searching our database.

[SWING] Binding selected elements of a JList to a JTable

Thread view: 
loris_p - 02 Mar 2008 11:50 GMT
Hi, I have a JTable bound to a List of Movements. Every movement has a
List of Users. I need a JList with selected elements bound to the
users contained in the List of the selected movement. I'm using
Netbeans 6.01. If I use the binding menu and bind selected elements to
${selectedElement.users} of the table it doesn't work. Any idea?
NeoGeoSNK - 03 Mar 2008 08:59 GMT
> Hi, I have a JTable bound to a List of Movements. Every movement has a
> List of Users. I need a JList with selected elements bound to the
> users contained in the List of the selected movement. I'm using
> Netbeans 6.01. If I use the binding menu and bind selected elements to
> ${selectedElement.users} of the table it doesn't work. Any idea?

:)
I have no idea, may be you can find the answer from the group
"comp.lang.java.gui"??
Lew - 03 Mar 2008 13:52 GMT
>> Hi, I have a JTable bound to a List of Movements. Every movement has a
>> List of Users. I need a JList with selected elements bound to the
[quoted text clipped - 5 lines]
> I have no idea, may be you can find the answer from the group
> "comp.lang.java.gui"??

clj.programmer isn't that far off, and the readership is basically the same,
so encouraging the OP to multi-post probably isn't a good idea.

The use of '${selectedElement.users}' gives me pause - isn't that JSP EL?

Anyway, absent any code examples let's assume that 'selectedElement' is the
name of the primary JList.  JLists do not have an attribute called 'users', so
there's no way for such an expression to be meaningful.

I think you have to actually create a backing ListModel (or equivalent) from
the selected items, and assign it as the model for the subsidiary JList.

Also, you really need to read and learn
<http://mindprod.com/jgloss/sscce.html>

Signature

Lew



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.