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.
Since you have a dominating feature in your layout (the image) you probably want to use a BorderLayout as your main layout.
frame.getContentPane().setLayout(new BorderLayout(4, 4));
then add the image to the BorderLayout.CENTER
next the JLabel wants to go in the BorderLayout.NORTH
Now, if you do that, it won't go to the far right, so create a JPanel for the north, add the JLabel to the panel, and place the panel in the north.
Now you need a layout for the north panel. A BoxLayout will work
northPanel.add(Box.createHorizontalGlue());
northPanel.add(label);