Calm Sea
Calm Sea

Reputation: 181

remove empty from table

In a special stage of my profgram , I want to change the rows hieght , this works but there is a gray empty space still in the table as shown in the image enter image description here

i tried the following

jTable1.setRowHeight(60);

jTable2.setPreferredSize(new java.awt.Dimension(120,225));
jTable2.setMaximumSize(new java.awt.Dimension(120,225));
jTable2.setMinimumSize(new java.awt.Dimension(120,225));

but the size of the table does not changed. Any solutions?

Upvotes: 0

Views: 297

Answers (1)

MadProgrammer
MadProgrammer

Reputation: 347184

Take a look at JTable.setFillsViewportHeight

Table fillsViewportHeight = false

Without

Table fillsViewportHeight = true

With

Upvotes: 4

Related Questions