mirror of
https://github.com/openjdk/jdk.git
synced 2026-01-28 12:09:14 +00:00
8375573: JTable ignores setPreferredWidth during initial layout when AUTO_RESIZE_LAST_COLUMN is enabled
This commit is contained in:
parent
9a42fdbac4
commit
9b6ac608ad
@ -3195,6 +3195,11 @@ public class JTable extends JComponent implements TableModelListener, Scrollable
|
||||
public void doLayout() {
|
||||
boolean prefWidthSet = false;
|
||||
TableColumn resizingColumn = getResizingColumn();
|
||||
// doLayout is called for both pack and show
|
||||
// so if initial preferred width is set by user then
|
||||
// it needs to be honoured even if resizingColumn
|
||||
// is set to last column on account of
|
||||
// AUTO_RESIZE_LAST_COLUMN autoResizeMode
|
||||
for (int i = 0; i < columnModel.getColumnCount(); i++) {
|
||||
if (columnModel.getColumn(i).getPreferredWidth() != 75
|
||||
&& columnModel.getColumn(i).getWidth() == 75) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user