• Post Reply Bookmark Topic Watch Topic
  • New Topic

jtable set value problem

 
joe jean
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In jtable when a value is being edited a border is highlighted arround the cell. But once the cursor is out of focus for instance to another component on the form, the border on the cell is still highlighted and the value that was entered on the cell doesnt get saved to the database. Is there a way to solve this issue.
 
Edisandro Bessa
Ranch Hand
Posts: 584
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Joe,

The red border around the cell means that the value you typed does not match with the data type of the column. I mean, if your column type is an Integer but you typed a String, boom !!! Bad things would happen.

In order to solve this problem, make sure your cell types array and the values you type for each column are matching.
 
joe jean
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I guess you misunderstood my statement. I get an outline while editing the cell, but when the mouse is clicked on someother control , the cell value doesnt get set on it, but if I click the mouse on the jtable, the values gets set on the cell. Is there a way to make it work if i click the mouse on some other control after editing the value on the cell.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!