I am facing a problem with JFrame
, when I am adding a background Image to frame, all the other components are hidden under the image, but I want to have it in opposite way, that everything goes on top of image (JButton
, JPasswordField
etc.)
Thank's for your effort and time.
setUndecorated(true);
sestSize(new Dimension(width, height));
window.setLayout(null);
setLocationRelativeTo(null);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setTitle("MyFrame\u2122");
getContentPane().add(window);
setResizable(false);
setContentPane(new JLabel(new ImageIcon("C:/Users/path/to/some/image/Image.jpg")));