Win a copy of Emmy in the Key of Code this week in the General Computing forum!
  • 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
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Paweł Baczyński
  • Piet Souris
  • Vijitha Kumara

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.
 
He does not suffer fools gladly. But this tiny ad does:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!