@Override
        public void mouseReleased(MouseEvent e) {
            int oldTabPressed = tabPressed;
            tabPressed = -1;
            if (oldTabPressed != -1) {
                tabPane.repaint(getTabBounds(tabPane, oldTabPressed));
            }
        }