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

Tip: Looking for answers? Try searching our database.

Boolean in JTable

Thread view: 
:-o - 22 Oct 2006 20:24 GMT
Thanks,

I created a JTable which has a column which can be "true" or "false".  I found
sample code where I extend DefaultTableModel overriding getColumnClass() so that
this column now has checkboxes.  Mouse clicks over checkboxes work fine.  How
can I programmatically make the checkbox checked or unchecked.

fc
hiwa - 22 Oct 2006 23:53 GMT
:-o wrote:
> Thanks,
[quoted text clipped - 5 lines]
>
> fc
You manipulate the model. Set the desired model data to true or false.
If you use DefaultTableModel method for that, view update should be
done automatically.
Thomas Fritsch - 23 Oct 2006 00:54 GMT
> I created a JTable which has a column which can be "true" or "false".  I
> found
[quoted text clipped - 3 lines]
> How
> can I programmatically make the checkbox checked or unchecked.
You can call the method
  public void setValueAt(Object value, int row, int column)
of your JTable or of its TableModel with a Boolean object as value.

Signature

Thomas



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.