*
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 Android Security Essentials Live Lessons this week in the Android 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: 19656
    
  18

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
 
 
subject: generate table data on button click
 
Similar Threads
jtable
Getting JPanel size
How to make a neat form?
JTable
JTable ........