|
Java™ by example!
|
|
|
How do I get started with a simple JTable?
 Using a simple Swing table in your GUI apps doesn't require a lot of code. Create a one-dimensional containing the table headers and a two-dimensional array that represents the contents. Create a JTable with those two arrays and add it to the container. This is the simpliest example. All cells are editable and column widths can be adjusted. If you want to have more control over your JTables, you can create your own TableModel, CellRenderer and CellEditor.
Further Information
Author of answer: Joris Van den Bogaert
Comments to this answer are only viewable by members. Login or become a member!
|
|
|
|
|