I've got sort of weird issue that I can't seem to figure out. I have something that looks like this:
As you can see, "Blambo" is a JLabel with an opaque, red background. The label sits on top of a little grey bar that has a single pixel blackish border all the way around it. I'd like my red warning to match the bar it's sitting on more nicely, i.e. I either need to make it two pixels shorter and move it down a pixel or I need to apply the same single pixel border to the top and bottom only. Of those two, the first is probably preferable as this piece of code is shared with other labels.
Thanks in advance for the help.
Edit: The code in question.
bgColor = Color.red;
textColor = Color.white;
setBackground(bgColor);
setOpaque(true);
// This line merely adds some padding on the left
setBorder(Global.border_left_margin);
setForeground(textColor);
setFont(font);
super.paint(g);
That border is defined thusly:
public static Border border_left_margin = new EmptyBorder(0,6,0,0);