Dear K. Tsang,
i appreciate your reply to my post. I looked into that doc, according to that, i have to create JTable manually. But in my case, i got them from netbeans auto-generated codes. I am simply asking, how to modify my code to update the data in the jTable at the runtime. Highly appreciate if you can demonstrate a simple code block.
Updated values not displaying until the loops ends
Your code is probably being executed from within an ActionListener. This code executes on the Event Dispatch Thread (EDT) which is responsible for handling events and undating the GUI. Therefore the GUI is not updated until the loop is finished executing. So the solution is to use a separate Thread for the long running task so you don't block the EDT.
Read the section from the Swing tutorial on Concurrency for more information. In particular, you will probably want to use a "SwingWorker" which executes on a separate Thread and then you can "publish" results to be dynamically updated in your table as required.
That which doesn't kill us makes us stronger. I think a piece of pie wouldn't kill me. Tiny ad:
how do I do my own kindle-like thing - without amazon