解决方案 »

  1.   

    个人猜测,仅供参考。
    别人的是调用操作系统原生的,AWT或SWT框架,你的是Swing模拟的。
      

  2.   


    JFileChooser fileChooser = new JFileChooser(
    FileSystemView.getFileSystemView());
    让它根据当前系统来呈现
      

  3.   


    import javax.swing.filechooser.*;
    import javax.swing.*;public class demo2 extends JFrame {
    JFileChooser filechooser = new JFileChooser(FileSystemView.getFileSystemView()); public demo2() {
    filechooser.showOpenDialog(demo2.this); // 显示打开文件对话框
    }; public static void main(String[] args) {
    demo2 a = new demo2();
    };}还是这样,请指教。
      

  4.   

    你可以用皮肤来解决这个问题,java里面自带了一些window的皮肤,用上去之后就和系统保持一致了。
      

  5.   


    import javax.swing.filechooser.*;
    import javax.swing.*;public class demo2 extends JFrame {
    JFileChooser filechooser = new JFileChooser(FileSystemView.getFileSystemView()); public demo2() {
    filechooser.showOpenDialog(demo2.this); // 显示打开文件对话框
    }; public static void main(String[] args) {
    demo2 a = new demo2();
    };}还是这样,请指教。
    try {
    UIManager.setLookAndFeel(UIManager
    .getSystemLookAndFeelClassName());
    JFileChooser fileChooser = new JFileChooser();
    fileChooser.showOpenDialog(null);
    } catch (Exception e) {
    }
    这样可以了,根据系统来得到UI
      

  6.   


    import javax.swing.filechooser.*;
    import javax.swing.*;public class demo2 extends JFrame {
    JFileChooser filechooser = new JFileChooser(FileSystemView.getFileSystemView()); public demo2() {
    filechooser.showOpenDialog(demo2.this); // 显示打开文件对话框
    }; public static void main(String[] args) {
    demo2 a = new demo2();
    };}还是这样,请指教。
    try {
    UIManager.setLookAndFeel(UIManager
    .getSystemLookAndFeelClassName());
    JFileChooser fileChooser = new JFileChooser();
    fileChooser.showOpenDialog(null);
    } catch (Exception e) {
    }
    这样可以了,根据系统来得到UI
    可以,表示非常感谢。