private void paintTrack(int x, int y) { int w = this.getWidth(); int h = this.getHeight(); Graphics g = this.getGraphics(); g.setColor(Color.BLUE); g.setXORMode(this.getBackground()); if (this.isHorizontal()) { g.drawLine(x,-1,x,h); } else { g.drawLine(-1,y,w,y); } g.dispose(); }