public void mouseDragged(MouseEvent e) {
                    dx = e.getX() + spacer.getX(); 
                    dy = e.getY() + spacer.getY();
                    spacer.setOpaque(true);
                    if (dx != -1 && CustomSplitPane.this.horizonal) {
                        spacer.setBounds(dx, 0, SPACER_SIZE, getHeight());
                    } else if (dy != -1 && !CustomSplitPane.this.horizonal) {
                        spacer.setBounds(0, dy, getWidth(), SPACER_SIZE);
                    }
                    repaint();
                }