[Webinar] Streamline your web hosting managementRegister Today

x
?
Solved

Two JTables are showing in a JFrame after two file selections.  I only want one shoiwing.

Posted on 2009-12-30
2
Medium Priority
?
484 Views
Last Modified: 2013-11-23
I have a small file chooser which is really a JFrame.  I select one file to tabulate and show in my application.  The first time the tabular data shows fine in the JTable however the second time I select the file another JTable with the tabular data shows in the parent JFrame also.  I want to "erase" or clear out the first iterations data JTable and I want to only show the second.  How would I do this?
0
Comment
Question by:jwright9
2 Comments
 
LVL 86

Expert Comment

by:CEHJ
ID: 26149635
You need to post your code
0
 
LVL 92

Accepted Solution

by:
objects earned 2000 total points
ID: 26149733
create a new (table) model each time instead of adding the data to the table
alternatively clear the table each time before you load the data
0

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Update (December 2011): Since this article was published, the things have changed for good for Android native developers. The Sequoyah Project (http://www.eclipse.org/sequoyah/) automates most of the tasks discussed in this article. You can even fin…
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
The viewer will learn how to use and create keystrokes in Netbeans IDE 8.0 for Windows.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

608 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question