File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Swing / AWT / SWT and the fly likes DefaultTableModel help Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Reply Bookmark "DefaultTableModel help" Watch "DefaultTableModel help" New topic
Author

DefaultTableModel help

charlie mills
Ranch Hand

Joined: Nov 01, 2008
Posts: 49
I'm trying to read in data from a file and then display the data in a table.

I've just managed to read the data into a string. I printed the data out in the command line just to check it was working and it was.
Then I tried to add the DefaultTableModel, but I got a it confused as to what code should be in which method and I can't get my program to compile now.
I think the code is all right, I've just got bits of it in the wrong place.

pete stein
Bartender

Joined: Feb 23, 2007
Posts: 1561
The error messages will tell you exactly what's wrong. I think that rather than someone giving you the solution, you would be best served in the long run to try to use the information given in these messages (and the Java API) to try to solve your problem. Then if you find some of the error messages confusing and hit a road block, come on back here, post the error message(s) and your questions and we'll explain it to you.

Best of luck!
Rob Camick
Ranch Hand

Joined: Jun 13, 2009
Posts: 1788
    
    2
So much for listening to the advice I gave you in your previous post. Sometimes I wonder why I even bother spending the time.

ignoreList++
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: DefaultTableModel help
 
Similar Threads
JTable ........
Color in JTable
Adding Column Dynamically to JTable
GridBagConstraints help
Problem with JTable