Reputation: 43
I need to make such table in a JPanel
.
Any ideas how to do it, to get the layout like the one on the picture below?
Upvotes: 0
Views: 110
Reputation: 1219
This is a simple code for creating a JTable like that
detailsTable = new JTable();
detailsTable.setFillsViewportHeight(true);
detailsTable.setModel(new DefaultTableModel(new Object[][] {},
new String[] { "LAST_NAME", "FIRST_NAME"}));
scrollPane = new JScrollPane(detailsTable);
panel1.add(scrollPane);
If you want to add to a table, you can check here
Hope this Helps!!!
Upvotes: 2