File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Swing / AWT / SWT and the fly likes Help me reducing JTABLE loading time.. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Help me reducing JTABLE loading time.. " Watch "Help me reducing JTABLE loading time.. " New topic

Help me reducing JTABLE loading time..

shailesh jamloki
Ranch Hand

Joined: Oct 28, 2004
Posts: 38
Hi my small application loads connected agents with properties in a jtable.
*Connected agents are are some process which are listening to some port.

If I have 30 agents and out of 20 are connected. So I have to load 20 agents in the table.

But when the application loads.. my swing application hangs as it takes time to see if all the agents are connected and then load only connected agents.

Is this possible to load a connected in the jtable as soon as we figure out those are connected. So that swing application do not be in loading state.

and update the jtable successively

Agador Paloi
Ranch Hand

Joined: Jan 24, 2006
Posts: 118
It sounds like you may want a seperate worker thread to update the JTable
Mikko Kohtamäki
Ranch Hand

Joined: Dec 13, 2008
Posts: 112

doInBackground() handles all connected agents and calls publish(agent) for every connected agent and in process(List<Agent> agents) the connected agent's properties are inserted into table.
I agree. Here's the link:
subject: Help me reducing JTABLE loading time..
It's not a secret anymore!