tableHeader.setPreferredSize(new Dimension(
tableHeader.getPreferredSize().width,
(int) (tableHeader.getPreferredSize().height * 1.2)
));
JScrollPane scrollPane = new JBScrollPane(
table,
ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED,
ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER
);
Dimension scrollDimension = new Dimension(
preferredScrollableViewportSize.width,
tableHeader.getPreferredSize().height + preferredScrollableViewportSize.height + 4
);
scrollPane.setMinimumSize(scrollDimension);
myComponent = ToolbarDecorator.createDecorator(table)
.disableUpAction()
.disableDownAction()
.setAddAction(new AnActionButtonRunnable() {