Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2009
    Posts
    15
    Rep Power
    0

    Default When executing screen freezes...

    Hi,

    Ive encountered a new problem, every time I want to click on a button in a drawed Jframe to launch a game, it launches but it freezes... What could be the cause? Should I dispose my Jframe or just buy a faster pc? And how do I dispose my Jframe?

    grtz
    Last edited by blackstormattack; 03-11-2009 at 10:01 PM.

  2. #2
    anteup is offline Member
    Join Date
    Sep 2008
    Posts
    13
    Rep Power
    0

    Default

    are you using an IDE if so which one?

  3. #3
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,315
    Blog Entries
    1
    Rep Power
    26

    Default

    This has nothing to do with the IDE being used or the speed of your PC, and everything to do with trying to call long processes on the EDT or Event Dispatch Thread. This is the main thread the Swing uses to draw with and interact with the user. This suggests that you should be launching your game from within a background thread.

    edit: start reading here -- Lesson: Concurrency in Swing (The Java Tutorials > Creating a GUI with JFC/Swing)
    Last edited by Fubarable; 03-12-2009 at 12:41 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •