50,639
社区成员
![](https://csdnimg.cn/release/cmsfe/public/img/topic.427195d5.png)
![](https://csdnimg.cn/release/cmsfe/public/img/me.40a70ab0.png)
![](https://csdnimg.cn/release/cmsfe/public/img/task.87b52881.png)
![](https://csdnimg.cn/release/cmsfe/public/img/share-circle.3e0b7822.png)
public void paint(Graphics g) {
g.drawImage(myimage, 35, 100, this);
}
public class JFrameBackground {
private JFrame frame = new JFrame("测试");
public static void main(String[] args) {
new JFrameBackground();
}
public JFrameBackground() {
frame.getLayeredPane().setLayout(null);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setSize(400, 400);
frame.setResizable(false);
frame.setVisible(true);
}
}