Results 1 to 5 of 5
- 12-07-2007, 10:13 PM #1
Member
- Join Date
- Dec 2007
- Posts
- 1
- Rep Power
- 0
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
- 12-08-2007, 12:11 AM #2
Senior Member
- Join Date
- Nov 2007
- Location
- Newport, WA
- Posts
- 141
- Rep Power
- 0
try calling repaint() on the JTable after you have added the value
- 12-27-2007, 09:25 PM #3
Member
- Join Date
- Dec 2007
- Posts
- 16
- Rep Power
- 0
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!
- 01-02-2008, 08:54 PM #4
Member
- Join Date
- Jan 2008
- Posts
- 1
- Rep Power
- 0
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!
:p
- 01-05-2008, 07:39 PM #5
Member
- Join Date
- Jan 2008
- Posts
- 4
- Rep Power
- 0
Similar Threads
-
how to display the alerts in table
By geeta_ravikanti in forum JDBCReplies: 4Last Post: 04-04-2008, 06:45 AM -
No datas in added to arraylist
By Preethi in forum New To JavaReplies: 0Last Post: 02-15-2008, 11:07 AM -
Tree with Listener not working when added to ScrollPane
By praveen.kb in forum AWT / SwingReplies: 2Last Post: 01-09-2008, 07:06 AM -
Data formatting for the <display:table>
By yuchuang in forum Web FrameworksReplies: 3Last Post: 12-14-2007, 10:52 AM -
Refresh session
By cachi in forum JavaServer Pages (JSP) and JSTLReplies: 1Last Post: 08-07-2007, 07:52 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks