I want to resize JTable inside JTabbedPane, but i have no clue how to do that. currently my JTab only display JTable on default size.
currently my code is like this
JTabbedPane tabbedPane = new JTabbedPane(JTabbedPane.TOP);
tabbedPane.setBounds(0, 0, 434, 262);
frame.getContentPane().add(tabbedPane);
JPanel panel = new JPanel();
panel.setLayout(null);
Object rowData[][] = {
{ "Row1-Column1", "Row1-Column2", "", "", "", "", "" },
{ "Row1-Column1", "Row1-Column2", "", "", "", "", "" },
{ "Row1-Column1", "Row1-Column2", "", "", "", "", "" },
{ "Row1-Column1", "Row1-Column2", "", "", "", "", "" },
{ "Row1-Column1", "Row1-Column2", "", "", "", "", "" },
{ "Row2-Column1", "Row2-Column2", "Row2-Column3", "", "", "",
"", "" } };
Object columnNames[] = { "Column One", "Column Two", "Column Three",
"", "", "", "" };
JTable table = new JTable(rowData, columnNames);
JScrollPane scrollPane = new JScrollPane(table);
tabbedPane.addTab("table", null, scrollPane, null);
here is my full code = My Code