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 generate table data on button click Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "generate table data on button click" Watch "generate table data on button click" New topic
Author

generate table data on button click

rahul S Sharma
Greenhorn

Joined: Jun 08, 2011
Posts: 21
Hi all,

I am new to Swings. I have made a frame and I put a button in it. I have written some hard code data in my code which is displaying in my table. Now I want that data to be display in my table when i click on the button.Here is the code...

Thanks


Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19718
    
  20

rahul S Sharma wrote:Swings

Swing is a proper noun.

Now I want that data to be display in my table when i click on the button.

Create a new TableModel (usually DefaultTableModel), then set that model for the JTable.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
 
Consider Paul's rocket mass heater.
 
subject: generate table data on button click