• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

Problem with JTable not getting refreshed.

 
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

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.

Thanx.

- Neha....
 
Ranch Hand
Posts: 264
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.


-Tad
 
Neha D
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Tad,

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.

Thanx.

Regards,
- Neha.......
 
reply
    Bookmark Topic Watch Topic
  • New Topic