{ Graphics g2 = g; Image doubleBuffer = null; RepaintManager rm = RepaintManager.currentManager(this);  if (isDoubleBuffered() && (rm.isDoubleBufferingEnabled()) && (! Thread.holdsLock(paintLock))) { doubleBuffer = rm.getOffscreenBuffer(this, getWidth(), getHeight()); }  synchronized (paintLock) { if (doubleBuffer != null) { g2 = doubleBuffer.getGraphics(); g2.setClip(g.getClipBounds()); }  g2 = getComponentGraphics(g2); paintComponent(g2); paintBorder(g2); paintChildren(g2);  if (doubleBuffer != null) g.drawImage(doubleBuffer, 0, 0, (ImageObserver) null); } }
{ paintComponent(g); paintBorder(g); paintChildren(g); }
	public void paint(Graphics g)	{		Graphics g2 = g;    Image doubleBuffer = null;    RepaintManager rm = RepaintManager.currentManager(this);		    if (isDoubleBuffered()        && (rm.isDoubleBufferingEnabled())        && (! Thread.holdsLock(paintLock)))		{        doubleBuffer = rm.getOffscreenBuffer(this, getWidth(), getHeight());                    }    synchronized (paintLock)                    {        if (doubleBuffer != null)          {            g2 = doubleBuffer.getGraphics();            g2.setClip(g.getClipBounds());		}		        g2 = getComponentGraphics(g2);		paintComponent(g2);        paintBorder(g2);		paintChildren(g2);        if (doubleBuffer != null)          g.drawImage(doubleBuffer, 0, 0, (ImageObserver) null);		}	}