How to set data to WebTable using DefaultTableModel?

Discuss here any questions about the WebLaF library.
Bugs can be posted directly to GitHub issues tracker.

How to set data to WebTable using DefaultTableModel?

Postby MalindaWMD » Tue Dec 01, 2015 2:25 pm

How to set data a to WebTable using DefaultTableModel ? If can't how to set data without passing any ColumnEditor or CellEditor?
MalindaWMD
 
Posts: 3
Joined: Sat Oct 31, 2015 11:30 am

Re: How to set data to WebTable using DefaultTableModel?

Postby mgarin » Tue Dec 01, 2015 7:12 pm

You need to provide a custom model (which will provide your data into the table) or pass data directly into table constructor (which eventually creates a table model anyway). ColumnEditor is not a thing (probably some custom class from libraries you are using?) and table CellEditor has nothing to do with the way data is provided into the table, it only provides an editor component when you need to edit some cell in the table.

WebTable works with data in the same way JTable does, so I would strongly recommend you to read the official extensive guide on JTable component - it should answer a lot of your questions:
https://docs.oracle.com/javase/tutorial ... table.html
User avatar
mgarin
Site Admin
 
Posts: 223
Joined: Mon Apr 16, 2012 1:01 pm
Location: Russia, Saint-Petersburg


Return to Questions

Who is online

Users browsing this forum: No registered users and 1 guest

cron