-2
我有一個按鈕,選擇一個file.It彈出並顯示其圖像數據,但每當我刪除程序產生的圖像,並選擇一個新的文件時,它保持坡平被刪除的圖像,但它顯示新選定的文件的正確的輸出數據。Java圖像輸出選擇刪除的圖像
我有一個按鈕,刪除該圖像文件。
(eventSource == fcButton) {
try {
if (myWav.getJFileChooser().showOpenDialog(AudioDriver.this) == JFileChooser.APPROVE_OPTION) {
File file = myWav.getFileFromGUI();
try{
AudioDriver Data = new AudioDriver(file, "out.png");
}catch(IOException ioe) {
showError(ioe);
} catch(UnsupportedAudioFileException uafe) {
showError(uafe);
}
try{
bi = loadImage(".....\\out.png");
}catch(IOException ioe){
showError(ioe);
}
jLabel.setIcon(new ImageIcon(bi));