JDK-8013558 : FileDialog doesn't refresh properly with -splash option
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 7
  • Priority: P3
  • Status: Resolved
  • Resolution: Duplicate
  • Submitted: 2013-04-04
  • Updated: 2014-11-17
  • Resolved: 2013-04-30
Related Reports
Duplicate :  
Description
FULL PRODUCT VERSION :
java version  " 1.7.0_11 " 
Java(TM) SE Runtime Environment (build 1.7.0_11-b21)
Java HotSpot(TM) 64-Bit Server VM (build 23.6-b04, mixed mode)

ADDITIONAL OS VERSION INFORMATION :
MacOSX 10.7.5
MacOSX 10.8.2

A DESCRIPTION OF THE PROBLEM :
The files of a selected folder are not shown when we use FileDialog with -splash option on MacOSX.
When we select a folder in a FileDialog, no files in the folder is shown always.  If we select the folder again, the files in the folder is shown.
Java6 doesn't have this problem.
Windows doesn't have this problem.

REGRESSION.  Last worked in version 6u31

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Run the attached problem with -splash option on Mac with java7
       ex.   java -splash:splash.png FileDialogTest
2. Select a folder on the dialog  --> files are not shown(problem)
3. Select an another folder --> files are not shown(problem)
4. Select the folder selected on the step2 again --> files are shown

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Files of the selected folder should be shown always.
ACTUAL -
Files of the selected folder is not shown.

REPRODUCIBILITY :
This bug can be reproduced always.

---------- BEGIN SOURCE ----------
import java.awt.FileDialog;

import javax.swing.JFrame;
import javax.swing.SwingUtilities;

public class FileDialogTest extends JFrame {
private static final long serialVersionUID = 1L;

public void start() {
FileDialog fd = new FileDialog(this);
fd.setVisible(true);
this.dispose();
}

public static void main(String[] args) {
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
new FileDialogTest().start();
}
});
}
}

---------- END SOURCE ----------

CUSTOMER SUBMITTED WORKAROUND :
1. Using JFileChooser
         (FileDialog is much better than JFileChooser on Mac)
2. Avoid using -splash option