• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Initializing JTable

 
Greenhorn
Posts: 12
Netbeans IDE Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, I have a JScrollPane and JTable in it.
I want to initialize that table at run time. using following code.
But it is not updating frame.
I think i am missing some method like repaint() for JFrame.
Please tell me a code using which i can refresh the JFrame and other mistakes in the following code.
below is the code:

 
Bartender
Posts: 5167
11
Netbeans IDE Opera Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
shraddha , since your problem is not the same as the one in the nearly 3 year old thread you posted in, I've moved it to a thread of its own.

To get better help sooner, post a SSCCE (Short, Self Contained, Compilable and Executable) example that demonstrates the problem.

edit: Before that, read the API for JScrollPane and follow the link to the tutorial on How to Use Scroll Panes where you will learn how to correctly show a JTable or other component in a JScrollPane.
 
Rancher
Posts: 1776
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Check how to dynamically change scroll pane content in How to use Scroll Panes
reply
    Bookmark Topic Watch Topic
  • New Topic