MyStaa
MyStaa

Reputation: 43

JPanel layout manager

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?

here

Upvotes: 0

Views: 110

Answers (1)

Kebab Programmer
Kebab Programmer

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

Related Questions