Help! 'new JFileChooser();' takes 30 seconds to finishe!

Discussion in 'Java' started by metfan, May 30, 2004.

  1. metfan

    metfan Guest

    I've jdk 1.4.2_03 installed and the hardware is Celeron 800M + 512M SDRAM

    this is the code I excuted:

    import java.util.Date;
    import javax.swing.JFileChooser;

    public class SimpleTest {
    public static void main(String[] args) {
    System.out.println(new Date());
    JFileChooser jf = new JFileChooser();
    System.out.println(new Date());
    }
    }

    and the result on my machine is

    Sun May 30 22:51:59 GMT+08:00 2004
    Sun May 30 22:52:27 GMT+08:00 2004

    It takes about 30 seconds to finish creating a JFileChooser.
    Yes my machine is not that fast but I don't think it should
    take 30 seconds to just create a JFileChooser. When I'm excuting
    the code, there's no other program running, so the CPU is almost
    100% free. And I used the 'Windows Task Manager' to watch the
    'java' thread, and at the first few seconds of the code excution,
    the CPU usage goes to 100%, and then the following 20 seconds, the
    CPU usage became < 5%, it seems that the 'new JFileChooser' is
    waiting for something? I don't know.

    What happened? Any idea? thank.
     
    metfan, May 30, 2004
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. tshad
    Replies:
    7
    Views:
    16,993
    tshad
    Mar 11, 2005
  2. 00_CP_D12
    Replies:
    3
    Views:
    8,923
    dilipv
    Feb 22, 2008
  3. Stu
    Replies:
    7
    Views:
    1,766
    Dave Thompson
    Mar 7, 2005
  4. Michael Tan
    Replies:
    32
    Views:
    989
    Ara.T.Howard
    Jul 21, 2005
  5. `p
    Replies:
    7
    Views:
    376
    Steve Litt
    Dec 14, 2005
Loading...

Share This Page