This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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 Android Security Essentials Live Lessons this week in the Android 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..
 
jQuery in Action, 2nd edition
 
subject: help needed on the java-focus
 
Similar Threads
Focus traversal problem in JTable
JTable(!!!)
JTable and JButton - Focus issue
JTable
JTable focus issue