//设置窗口放大缩小时改变图片大小
frame.addComponentListener(new ComponentAdapter()
{
@Override
public void componentResized(ComponentEvent e)
{
updateBack();
}
});
private void updateBack()
{
if (null != backLabel)
{
int backw = JXCFrame.this.frame.getWidth();
int backh = frame.getHeight(); // 获取窗口的宽和高
backLabel.setSize(backw, backh); // 设置标签的宽和高
backLabel.setLayout(new BorderLayout());
// 导入背景图片
backLabel.setText("
fire the whole ,open the door ,close the window