I want to add a JLable on my JDesktopePane..i wrote the below given code..but the Label is not displayed on the pane.
{
frame1.setContentPane(desktop);
frame1.setSize(900,700);
frame1.setVisible(true);
desktop.setBackground(Color.DARK_GRAY );
JLabel label1 = new JLabel("Main Page", SwingConstants.CENTER);
label1.setFont(new Font("SansSerif",Font.ITALIC + Font.BOLD,54));
desktop.add(label1);**
}