doubleGC.setBackground(gray);
doubleGC.fillRoundRectangle(0, borderSize/2, bounds.width+borderSize*2, bounds.height+borderSize*2, borderSize/2, borderSize/2);
doubleGC.setBackground(borderColor);
doubleGC.fillRoundRectangle(borderSize/2, 0, bounds.width+borderSize*2, bounds.height+borderSize*2, borderSize/2, borderSize/2);
doubleGC.drawImage(scaledImage, borderSize + borderSize / 2, borderSize);
doubleGC.dispose();
gc.drawImage(doubleBuffer, 0, 0);