• Post Reply Bookmark Topic Watch Topic
  • New Topic

Returning a boolean value in a object return method  RSS feed

 
David Dickinson
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have implemented the getValueAt() method of the AbstractTableModel class but the return type is object and I need to return a boolean value so the table populates correctly.

Can someone suggest how to convert from a boolean to an object? I've never had this problem before.

Thank-you
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Convert the primitive boolean to a java.lang.Boolean object using Boolean.valueOf.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!