• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Bear Bibeault
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Jj Roberts
  • Tim Holloway
  • Piet Souris
Bartenders:
  • Himai Minh
  • Carey Brown
  • salvin francis

jtable set value problem

 
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.
 
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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic