File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Swing / AWT / SWT and the fly likes problem with JTable Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "problem with JTable" Watch "problem with JTable" New topic

problem with JTable

Nilanjan Sahu

Joined: Apr 27, 2008
Posts: 3
I've problem with inserting rows dynamically in JTable. How can I use DefaultTableModel in jtable if i've already set the model of the table. Can I use JList instead of JCombobox in jTable.
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10817

There is just confusing information here without any concrete facts.

1)Do you want to know how to dynamically add rows to the table? Did you go through the DefaultTableModel API? Did you notice any methods which would let you add rows/ columns?
2)What kind of table model have you already provided? What problem are you facing here?
3) You can use any component which subclasses Component as the renderer. The TableCellRenderer#getTableCellRendererComponent() is expected to return a Component, so does the TableCellEditor.

If you give us more information on #1 and #2, it will help us help you.
Please tell us the details

[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
I agree. Here's the link:
subject: problem with JTable
It's not a secret anymore!