wood burning stoves 2.0*
The moose likes Swing / AWT / SWT and the fly likes help needed on the java-focus Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "help needed on the java-focus" Watch "help needed on the java-focus" New topic
Author

help needed on the java-focus

Aurelien Faillon
Greenhorn

Joined: Jul 07, 2004
Posts: 9
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?


....A...............N<br />B.......T.......A....<br />............M........
Aurelien Faillon
Greenhorn

Joined: Jul 07, 2004
Posts: 9
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..
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: help needed on the java-focus