Hey guys! So I was wondering -- what's the syntax for updating a JTable that is being displayed on the screen? I know how to allow cells to be edited, but what if I want to like add in entirely new rows while it's being displayed? I tried repaint() and update() but neither seems to be working for me. I thought there would be a fairly simple example online for doing this, but I searched on Google and was surprised that I couldn't find anything that seemed to do this. I currently am trying to get around the issue by removing the frame, creating a new one with a new table, and displaying that one, but that is like ridiculously slow for what I am trying to do. Can someone please give me a sample syntax for updating a JTable once it's already been displayed on the screen?

This article has been dead for over six months. Start a new discussion instead.