void (Graphics g) { //g.setColor(Color.orange); //g.fillRect(0, 0, getSize().width, getSize().height); //long time = System.currentTimeMillis(); Rectangle clip = g.getClipBounds(); ///dg.setClip(r.x, r.y, r.width, r.height); paint(g, clip.x, clip.y, clip.width, clip.height, content, isEnabled()); //System.out.println(System.currentTimeMillis() - time); ///g.setClip(0, 0, getSize().width, getSize().height); //g.setColor(Color.red); g.drawRect(clip.x, clip.y, clip.width - 1, clip.height - 1); }