Add other components to JFrame with background
Posted
by bnabilos
on Stack Overflow
See other posts from Stack Overflow
or by bnabilos
Published on 2010-06-02T18:06:14Z
Indexed on
2010/06/02
18:24 UTC
Read the original article
Hit count: 184
Hello,
I want to add a background image to my JFrame but when I do it using the code below, I'm unable to add other elements like JLabel or JTextField.
ImageIcon icon = new ImageIcon("src/images/back.jpg");
backImage = icon.getImage();
BackgroundImagePanel contentPane = new BackgroundImagePanel();
contentPane.setBackgroundImage(backImage);
this.setContentPane(contentPane);
Can you tell me please if there is another way to add JTabbedPane to a JFrame with a background ?
Thank you.
© Stack Overflow or respective owner