为什么会读取出现多余的背景?此时移动分割线,多余的背景又消失了。是延迟吗?
item11.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
// TODO Auto-generated method stub
JFileChooser chooser=new JFileChooser();//创建文件选择器
chooser.showDialog(null, "导入图片");
imageFile = chooser.getSelectedFile();
try {
srcBufferedImage = ImageIO.read(imageFile);
panel1.showImage(srcBufferedImage);
} catch (Exception e1) {
// TODO: handle exception
e1.printStackTrace();
}
}
});