Java

 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me



Go Back   Tutorialized ForumsWeb Design & DevelopmentJava

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Tutorialized Forums Sponsor:
  #1  
Old August 5th, 2004, 02:39 AM
aurelien aurelien is offline
Contributing User
Tutorialized Newbie (0 - 499 posts)
 
Join Date: Aug 2004
Posts: 3 aurelien New User: is a brand new recruit and a unknown entity at this point. 
Time spent in forums: < 1 sec
Reputation Power: 0
problem with java focus

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?

Reply With Quote
  #2  
Old August 5th, 2004, 04:57 AM
aurelien aurelien is offline
Contributing User
Tutorialized Newbie (0 - 499 posts)
 
Join Date: Aug 2004
Posts: 3 aurelien New User: is a brand new recruit and a unknown entity at this point. 
Time spent in forums: < 1 sec
Reputation Power: 0
I've find an other way to do it but I don't succeed either...

I can change the selection in the JTable to another cell, so I've select the last cell of the row which contains another button. If I clikck on this button with my mouse, I can send the elements after... but I don't want the user have to click... how can I click programmaticaly this button which is in a JTable?

please... help me...

Reply With Quote
  #3  
Old August 5th, 2004, 07:10 AM
aurelien aurelien is offline
Contributing User
Tutorialized Newbie (0 - 499 posts)
 
Join Date: Aug 2004
Posts: 3 aurelien New User: is a brand new recruit and a unknown entity at this point. 
Time spent in forums: < 1 sec
Reputation Power: 0
I've find the solution...

I just add one line:

table.editCellAt(0,1);

so the cell which is selected (the 4th) is deselected and the first one is selected (but I don't care) so the entry is recorded and the value is now knew...

thanks for nothing... but if you have the problem one day, you have already the solution...
__________________
I'm not a monkey....

Reply With Quote
  #4  
Old August 2nd, 2012, 02:31 PM
Jason Martin Jason Martin is offline
Registered User
Tutorialized Newbie (0 - 499 posts)
 
Join Date: May 2012
Posts: 65 Jason Martin User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 h 52 m 22 sec
Reputation Power: 2
Quote:
Originally Posted by aurelien
I've find the solution...

I just add one line:

table.editCellAt(0,1);

so the cell which is selected (the 4th) is deselected and the first one is selected (but I don't care) so the entry is recorded and the value is now knew...

thanks for nothing... but if you have the problem one day, you have already the solution...




table.editCellAt(0,1); its work....

Reply With Quote
Reply

Viewing: Tutorialized ForumsWeb Design & DevelopmentJava > problem with java focus


Developer Shed Advertisers and Affiliates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 

Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap