Is there a way to create a shadow effect around the edges on a rectangle that I want to add on a JPanel.
This is how I will be creating the rectangles but I don't know how to add shades around
the edges
public void paint(Graphics g) {
super.paintComponents(g);
g.drawRect(340,315, 200, 120);
g.drawRect(5,315, 200, 120);
}