0
我想使用按钮更改JFrame的图像背景。我知道如何使用JFrame和Jbutton。如何使用JButton在JFrame中更改背景图像?
我想使用按钮更改JFrame的图像背景。我知道如何使用JFrame和Jbutton。如何使用JButton在JFrame中更改背景图像?
,你应该在你的按钮动作监听器添加以下代码
setContentPane(new JLabel(new ImageIcon("C:\\Users\\Computer\\Downloads\\colorful design.png")));