• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

help needed on the java-focus

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,

First of all, excuse my poor english...

I want to create a java-swing application with JTable and where you have to press a JButton to send the elements which are in the JTable to a database... but when I press the button the last cell that I have complete in the JTable seems to be not recorded... the object inside is "null"...

so I think I have to add a focus for change it and validate the record in the JTable, but I don't know how...

could you help me?
 
Aurelien Faillon
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I've found the solution...

just add this line:

table.editCellAt(0,1);

so the edited cell (the (0,4)'s one ) is deselected and his value is recorded...

I have a problem.... I find the solution...

thanks for..... reading..
 
reply
    Bookmark Topic Watch Topic
  • New Topic