Hello I read about Layouts but didn't get which one to use for my application. I want to add image to JPanel and place JLabel on op right corner just below the title bar.
I have written code for that but it is not working. JLabel is displayed at Centre.
My code is
// Below line adds image to Jpanel
panel = new ImagePanel(backgroundImage);
// I want to add below label to Jpanel
JLabel jdesignNo=new JLabel(designNo);
jdesignNo.setFont((new java.awt.Font("Times New Roman", 1, 30)));
jdesignNo.setBounds(900, 100, 50, 30);
jdesignNo.setBackground(Color.GREEN);
panel.add(jdesignNo);
frame.getContentPane().add(panel);
frame.setVisible(true);
In above code i have set required location by setBound but it does not work.
How to solve this problem ?
Thanks !!!