void (MouseEvent e) { super.processMouseMotionEvent(e); if (e.getID() == MouseEvent.MOUSE_DRAGGED) { int totalWidth = ThreeDiffSplitter.this.getWidth(); if (totalWidth > 0) { Point point = SwingUtilities.convertPoint(this, e.getPoint(), ThreeDiffSplitter.this); float proportion = (float)mySide.select(point.x, totalWidth - point.x) / (float)totalWidth; setProportion(proportion, mySide); revalidate(); repaint(); } } }