Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Booleans in JTable

 
Tim Lovern
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have an app that displays database metadata using a JTable on a scroll panel. The form was designed using netbeans ide.
In the forms designer, I can set a column property to be boolean. So far, so good.
However, when I go to load the table, using the following code snippet, it won't compile:
table.setValueAt(metaData.isIncluded(), iLoop, 2);
iLoop is the row within the table and corresponds to the entry of the data in an ArrayList.
Can't pass a boolean in the setter. Hmm, but I can declare the column to be a boolean during design.
Any help would be very much appreciated.
thanks in advance!
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There's a difference between Boolean and boolean... though to fix it all you need to do is :
 
Tim Lovern
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks, I knew it had to be something as simple as that.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!