I have a JTabbedPane with 3 tabs. The first tab has a JScrollPane which further holds a JTable. But sometimes what happens is the JTable doesnt get refreshed & a blank tab is displayed. When I click on the second tab & then come back to the first tab, then I can see the JTable with the data. So the problem is with the JTable not getting refreshed. Can anyone please explain me as to why this happens and help me out with this problem. I need this urgently. All help is appreciated.
What are you doing when it doesn't get refreshed? You may want to play with update(Graphics g) repaint() or validate() after whatever method/action is leaving the tab blank.
Its been several years since I've used swing (until the last month) so I don't recall how everything works exactly.
Joined: Oct 12, 2004
Well I am encountering this problem as soon as my applet gets loaded. On clicking on the main tab I see the first tab on it as blank. I also tried using revalidate(), validate() & also repaint() on the tabbed pane & also on the JTable which is placed on a JScrollPane on this tab but it shows me no change. It still remains blank. And this occurs only sometimes.
Can you suggest as what can be done to resolve this issue.