Problem: JLabel/JButton hides behind Image Background

Hi all, i am hitting a problem.

I used netbeans to draw up a UI,

Bacically i have a JLabel loaded with an image background, then eclipse it over the JPanel. And when i put a JButton in the JPanel, it seems to hide behind the background, in front og the JPanel but eclipsed by the JLabel.

Thanks for any help.

[334 byte] By [Marvelousa] at [2007-11-27 6:07:16]
# 1
post your executable code.
AnanSmritia at 2007-7-12 16:24:28 > top of Java-index,Desktop,Core GUI APIs...
# 2

Hi, hope it helps.

lbl_msg_detectingStatus.setFont(new java.awt.Font("Arial", 0, 24));

lbl_msg_detectingStatus.setText(java.util.ResourceBundle.getBundle("com/mcs/tendis/Tendis").getString("mis.lbl.status"));

lbl_msg_detectingStatus.setPreferredSize(new java.awt.Dimension(200, 30));

jPanel1.add(lbl_msg_detectingStatus, new org.netbeans.lib.awtextra.AbsoluteConstraints(700, 150, -1, -1));

driveDetectionPanel.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

lbl_background.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/form/sys/infopanel010607C1.jpg")));

driveDetectionPanel.add(lbl_background, new org.netbeans.lib.awtextra.AbsoluteConstraints(-130, 100, 260, 490));

jPanel1.add(driveDetectionPanel, new org.netbeans.lib.awtextra.AbsoluteConstraints(710, 190, 260, 490));

jLabel2.setText("Detecting...");

jLabel2.setPreferredSize(new java.awt.Dimension(100, 14));

jPanel1.add(jLabel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(800, 140, -1, -1));

jLabel1.setText("(A:) CD Drive:");

jLabel1.setPreferredSize(new java.awt.Dimension(100, 14));

jPanel1.add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(870, 140, -1, -1));

Marvelousa at 2007-7-12 16:24:28 > top of Java-index,Desktop,Core GUI APIs...
# 3
not too 'Marvelous' at posting executable code
Michael_Dunna at 2007-7-12 16:24:28 > top of Java-index,Desktop,Core GUI APIs...
# 4

Since you obviously don't understand what "executable code" is you should read this link first:

If you need further help then you need to create a [url http://homepage1.nifty.com/algafield/sscce.html]Short, Self Contained, Compilable and Executable, Example Program[/url] (SSCCE) that demonstrates the incorrect behaviour.

Don't forget to use the [url http://forum.java.sun.com/help.jspa?sec=formatting]Code Formatting Tags[/url] so the posted code retains its original formatting.

And by the way posting code with custom classes like the Netbeans layout manager doesn't count as executable code since most of us don't use Netbeans and therefore don't have access to the classes.

camickra at 2007-7-12 16:24:28 > top of Java-index,Desktop,Core GUI APIs...