I wanted to make my own sort of message boxes for a program I'm working on for both stylistic reasons and later some functional ones.
First I have it create a black JPanel and make it the glass panel so that it may be slightly transparent as well as in-front of everything. After that, I add a custom JPanel in front of that, that serves as the actual message. The problem is, when I add an object to the center of it, the object underneath it comes to the front; and by underneath, I man under the glass panel. If I add something to the top, where there's nothing under it, it has not effect. Also, I'm using BorderLayout if that makes a difference.