mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
NPE when updating column sizes of a table with no header
This commit is contained in:
@@ -29,7 +29,9 @@ import javax.swing.table.*;
|
||||
import java.awt.*;
|
||||
import java.awt.event.MouseAdapter;
|
||||
import java.awt.event.MouseEvent;
|
||||
import java.util.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
public class TableView<Item> extends BaseTableView implements ItemsProvider, SelectionProvider {
|
||||
@@ -115,6 +117,10 @@ public class TableView<Item> extends BaseTableView implements ItemsProvider, Sel
|
||||
}
|
||||
|
||||
public void updateColumnSizes() {
|
||||
if (getTableHeader() == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
ColumnInfo[] columns = getListTableModel().getColumnInfos();
|
||||
for (int i = 0; i < columns.length; i++) {
|
||||
final ColumnInfo columnInfo = columns[i];
|
||||
|
||||
Reference in New Issue
Block a user