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 / August 2006

Tip: Looking for answers? Try searching our database.

PopUp TableCellEditor?

Thread view: 
Ian Wilson - 23 Aug 2006 17:01 GMT
First an apology, in a previous post I committed the Usenet sin of
asking "How do I do X" when I really wanted to know "How do I do Y" - I
thought that doing X was the way to achieve Y.

I have a JTable displayed in the usual way. One of the editable columns
contains short codes. This is for brevity, to conserve space. So the
codes are shown in a narrow column.

However I wanted the table cell editor to allow the user to pick from a
list of the long names for these codes. I think this would help people
who are not familiar with the short codes.

For the TableCellEditor I tried using a JComboBox that shows the names
instead of the codes. It became obvious that the JComboBox width is
constrained by the table column width and so is normally not wide enough
to show the long names.

So - is there some other widget I can use in conjunction with a JTable
for this?

Would it be wiser to have a normal editor for the short codes but have
available some method (e.g. a keyboard shortcut) that will popup some
more elaborate "chooser" JDialog of my own devising?
Rogan Dawes - 28 Aug 2006 10:46 GMT
> First an apology, in a previous post I committed the Usenet sin of
> asking "How do I do X" when I really wanted to know "How do I do Y" - I
[quoted text clipped - 19 lines]
> available some method (e.g. a keyboard shortcut) that will popup some
> more elaborate "chooser" JDialog of my own devising?

Take a look for the TAME swing examples. You'll find one showing how you
can have a popup editor that is wider than the column width.

Rogan
Ian Wilson - 31 Aug 2006 10:46 GMT
>> First an apology, in a previous post I committed the Usenet sin of
>> asking "How do I do X" when I really wanted to know "How do I do Y" -
[quoted text clipped - 22 lines]
> Take a look for the TAME swing examples. You'll find one showing how you
> can have a popup editor that is wider than the column width.

Thanks, their SteppedComboBox does exactly what I wanted.


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.