g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
if (topConnected) {
GradientPaint gp = new GradientPaint(new Point(0, 0), new Color(0, 0, 0, 0), new Point(0, bh), new Color(0, 0, 0, 42));
g2.setPaint(gp);
g2.fillRoundRect(0, 0 - roundDiameter, bw - 1, bh - 1 + roundDiameter, roundDiameter, roundDiameter);
g2.drawRoundRect(0, 0 - roundDiameter, bw - 2, bh - 2 + roundDiameter, roundDiameter, roundDiameter);
GradientPaint gp1 = new GradientPaint(new Point(0, 0), new Color(0, 0, 0, 0), new Point(0, bh), new Color(96, 96, 96));
g2.setPaint(gp1);
g2.drawRoundRect(0, 0 - roundDiameter, bw - 2, bh + roundDiameter - 1, roundDiameter, roundDiameter);
}