1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
|
public void createPage3()
{
panel3 = new JPanel();
panel4 = new JPanel();
panel3.add(panel4);
panel3.setLayout(null);
panel4.setBorder(BorderFactory.createEtchedBorder(Color.BLACK,Color.YELLOW));
panel4.setBounds(30,300,720,170);
JTable table = new JTable(data, columnNames);
table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
JScrollPane scroll = new JScrollPane(table);
panel4.add(scroll, BorderLayout.CENTER);
panel4.setLayout(new BorderLayout());
panel4.add(table.getTableHeader(), BorderLayout.PAGE_START);
panel4.add(table, BorderLayout.CENTER);
} |
Partager