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?

Recommended Answers

All 3 Replies

Member Avatar for vjcagay

try .notify();

Why on earth would he try notify()? This has nothing to do with a threading issue.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.