Timetable chart ideas

broken image

There are two JTable constructors that directly accept data ( SimpleTableDemo uses the first):

broken image

JTable table = new JTable(data, columnNames) SimpleTableDemo.java declares the column names in a String array: Resize the window containing the table so that it's bigger than necessary to display the whole table.Īll the table cells become wider, expanding to fill the extra horizontal space.The column changes size, and the other columns adjust to fill the remaining space. Now press the mouse button and drag to the right or left. Position the cursor just to the right of a column header. Now press the mouse button and drag to the right.Īs you can see, users can rearrange columns in tables. Generally, you begin editing a text cell by double-clicking it. A special highlight indicates that the 'Snowboarding' cell is editable. The entire first row is selected, indicating that you have selected Kathy Smith's data. Or, to compile and run the example yourself, consult the example index.Ĭlick the cell that contains 'Snowboarding'.

broken image

Java™ Web Start ( download JDK 7 or later). Click the Launch button to run SimpleTableDemo using

broken image