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 / February 2004

Tip: Looking for answers? Try searching our database.

how to get no selection for 1 column of a jtable?

Thread view: 
Matt Newcomb - 11 Feb 2004 08:49 GMT
G'day,

Hi, sorry if this is obvious, I've been struggling with it for a few
hours now and am ready to say 'uncle'.  I've got a JTable with columns
1-x filled with data and column 0 has a set of labels describing the
data in it's row.  I want to make it so you cannot select any cells in
column 0 but haven't been able to figure out how to do this.  What's
the correct approach?  Do I have to write a bunch of event listeners (
keyPressed, mousePressed, etc ) for the table, or is there something
I'm missing.

Thanks,

Matt
Nick H - 11 Feb 2004 14:41 GMT
> G'day,
>
[quoted text clipped - 10 lines]
>
> Matt

there is a ColumnSelectionListener (or similar, that could be slightly
different) which will handle what happens when you select a particular
column. So you could then get it to check if column 0 is selected, and
if so, deselect it (i think by making column -1 selected? maybe. look it up)

hth

Signature

nick h



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



©2009 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.