Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

how to remove Jtable  RSS feed

 
Vaibhav Deshpande
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I want to remove a Jtable which is painted on a frame.
What problem i am facing is that when first time user selects a text file
data of that file get populated into jtable. if user now again selects one file a new Jtable get opened and get populated.
What I want is to remove that first one jtable.

thanks,

vebs
 
Craig Wood
Ranch Hand
Posts: 1535
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you don't want to have to throw the old JTable away you can update it's model with your new data. If you do want to swap them you can treat your JTables like any components and

The Container container might be a JScrollPane or JPanel...
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!