TableView<CombinedNestingRule> () { String childColumn = LangBundle.message("child.file.suffix.column.name"); String parentColumn = LangBundle.message("parent.file.suffix.column.name"); final ListTableModel<CombinedNestingRule> model = new ListTableModel<>( new ColumnInfo<CombinedNestingRule, String>(parentColumn) { @Override public int getWidth(JTable table) { return JBUIScale.scale(125); } @Override public boolean isCellEditable(CombinedNestingRule rule) { return true; } @Override public String valueOf(CombinedNestingRule rule) { return rule.parentSuffix; } @Override public void setValue(CombinedNestingRule rule, String value) { rule.parentSuffix = value.trim(); } }, new ColumnInfo<CombinedNestingRule, String>(childColumn) { @Override public boolean isCellEditable(CombinedNestingRule rule) { return true; } @Override public String valueOf(CombinedNestingRule rule) { return rule.childSuffixes; } @Override public void setValue(CombinedNestingRule rule, String value) { rule.childSuffixes = value; } } ); final TableView<CombinedNestingRule> table = new TableView<>(model); table.setRowHeight(new JTextField().getPreferredSize().height + table.getRowMargin()); return table; }