Click here to Skip to main content
15,881,600 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hello programmers,
how can i access to a JTable from another form, like refresh it or something else ?
(i have a jtable in form1 and from form2 i wish to refresh jtable)
Posted
Comments
TorstenH. 10-Jun-14 2:49am    
do you have a datamodel behind the table? if so it should update automatically.
if not -> get one.

1 solution

Let's say your JTable instance is in form1. I would make a public function to refresh that instance and that function could be invoked from another form.

You could invoke your function like this:
Java
form1.RefreshMyTable();


I hope this helps!
 
Share this answer
 
v2
Comments
TorstenH. 11-Jun-14 3:08am    
form1.RefreshMyTable(); ??

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900