Skip to main content

Master-Slave form in LWUIT

Please note these forums are being decommissioned and use the new and improved forums at
1 reply [Last post]
Joined: 2011-02-15

Hello colleagues!
Small question - did anybody face a need to create master-slave form using LWUIT? The task is following: I need to have a sort of grid with order's short details, and a separate field to reflect the selected order's extended details. I thought about using a Table component - but didn't find how to show cursor within a table. If to use a simple GroupBox than I don't know how to catch cursor position changing event and how to obtain the currently highlighted row number.
So meanwhile I have no clue how to realize this task. Does anybody have an idea?
Thank you very much in advance!

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2003-11-07

Sounds kinky.
I'm guessing you mean master-details ;-)

Usually we do that with a List, you can just track selection events in the list and since the list can hold arbitrary objects (with a renderer just like Swing) you can use them to display the detail information. Just build a vector or if the data set is really large a list model and construct a list.
Add a selection listener to the list and update the detail components based on selection.