Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 12-07-2007, 11:13 PM
Member
 
Join Date: Dec 2007
Posts: 1
sravanthi narra is on a distinguished road
how to refresh the table when a new account is added and display instantly
hi frnds lot of hurry need urgent help

i created a table in which students information is displayed as soon as the shell opens and when i click anyone then at the bottom in text boxes i can add a new account.NOW COMES MY PROBLEM,WHEN I ADD A NEW ACCOUNT THE NEW ACCOUNT IS NOT DISPLAYED INSTANTLY IN THE TABLE .I NEED TO LOGOUT N AGAIN SIGNIN TO VIEW THE NEW ACCOUNT.HOW CAN I UPDATE THE NEW ACCOUNT INSTANTLY IN THE ABOVE TABLE.i tried everything like
con.commit and creating a new method n trying to call tht n display again but nothng is working.i read about firetableX methods in swings but really dont know how to implement

plzzzzz reply fast
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 12-08-2007, 01:11 AM
Senior Member
 
Join Date: Nov 2007
Location: Newport, WA
Posts: 141
staykovmarin is on a distinguished road
try calling repaint() on the JTable after you have added the value
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 12-27-2007, 10:25 PM
Member
 
Join Date: Dec 2007
Posts: 16
Cazrin is on a distinguished road
Although I'm not 100% confident using JTables, I have got *some* working how I want. I take it you're using a custom table model? If you've managed to add the new account to the list your table model is using, you can just use:

tabelModel.fireTableDataChanged();

I know it's quite a late reply, but maybe it can still help! Although I don't think it's the most resource friendly function, it's working for me!
Bookmark Post in Technorati
Reply With Quote
  #4 (permalink)  
Old 01-02-2008, 09:54 PM
Member
 
Join Date: Jan 2008
Posts: 1
Beemer79R65 is on a distinguished road
Solved it for me.
I was having a similar problem and this solved it for me. I have a custom table model and am constantly changing the data in the model. Thanks very much!
Bookmark Post in Technorati
Reply With Quote
  #5 (permalink)  
Old 01-05-2008, 08:39 PM
Member
 
Join Date: Jan 2008
Posts: 4
FredJavaFreak is on a distinguished road
Try to call the updateUI method...
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

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
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to display the alerts in table geeta_ravikanti Database 4 04-04-2008 07:45 AM
No datas in added to arraylist Preethi New To Java 0 02-15-2008 12:07 PM
Tree with Listener not working when added to ScrollPane praveen.kb AWT / Swing 2 01-09-2008 08:06 AM
Data formatting for the <display:table> yuchuang Web Frameworks 3 12-14-2007 11:52 AM
Refresh session cachi JavaServer Pages (JSP) and JSTL 1 08-07-2007 08:52 AM


All times are GMT +3. The time now is 12:01 AM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org