final JTableHeader tableHeader = getTableHeader();
if (!showHeader) {
tableHeader.setVisible(false);
tableHeader.setPreferredSize(new Dimension(-1, 0));
} else {
tableHeader.addMouseMotionListener(new MouseMotionAdapter() {
public void mouseDragged(MouseEvent e) {
scrollPane = UIUtil.getParentOfType(JBScrollPane.class, DBNTable.this);
if (scrollPane != null) {
calculateScrollDistance();
if (scrollDistance != 0 && scrollTimer == null) {