Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JTable getValueAt null Exception  RSS feed

 
Jacky Luk
Ranch Hand
Posts: 634
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I don't know why this line
throws null exception.
String email = t.getValueAt(i, 5).toString();




 
K. Tsang
Bartender
Posts: 3648
16
Firefox Browser Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't see anything particular wrong with the coding. How are you getting the values? From a table model or something else?
 
Jacky Luk
Ranch Hand
Posts: 634
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
K. Tsang wrote:I don't see anything particular wrong with the coding. How are you getting the values? From a table model or something else?


I directly input those values into the table
The table was created by netbeans first.
And I wasn't happy about it, but it shouldn't be a problem
There is a same problem with
I tried to add another dummy column to both
of these models to no avail, but email and Price are null when inputted samples like
1234@yahoo.com.cn and 1000

Strange-Error.png
[Thumbnail for Strange-Error.png]
strange-error-2.png
[Thumbnail for strange-error-2.png]
 
Jacky Luk
Ranch Hand
Posts: 634
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I guess the project is pointing at the wrong source.
Try to figure it out.
All the corrections have no effect on the output
 
Jacky Luk
Ranch Hand
Posts: 634
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jacky Luk wrote:I guess the project is pointing at the wrong source.
Try to figure it out.
All the corrections have no effect on the output


No, don't know what the damn is going on
Have to demo tomorrow.
Thanks
Jack
 
Jacky Luk
Ranch Hand
Posts: 634
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jacky Luk wrote:
Jacky Luk wrote:I guess the project is pointing at the wrong source.
Try to figure it out.
All the corrections have no effect on the output


No, don't know what the damn is going on
Have to demo tomorrow.
Thanks
Jack


It seems to be an oracle bug to me
 
Rob Spoor
Sheriff
Posts: 21048
85
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jacky Luk wrote:

Your table initially contains nothing but null values. If you don't change those values then of course getValueAt will return null.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!