Page 2 of 2 FirstFirst 12
Results 21 to 24 of 24

Thread: Help!

  1. #21
    rowanabejjani is offline Member
    Join Date
    Jun 2011
    Posts
    19
    Rep Power
    0

    Default

    Hey Norm i found the solution,
    i was running the snake game from the ProjetFinalView.java using a button.
    * but what i was doing wrong is the way i was running it.
    * for a game1 running it as a normal jFrame will work because no threads
    * have to sleep, run or stop. The snake is a frame running thread. Though i
    * extend it as a jFrame and implements it to be runnable.
    * in the ProjetFinalView.java instead of running the game2 as a jFrame, i run it
    * as a thread so when the thread sleeps , starts, stops or whatever it won't
    * affect the whole frame which was causing it to hang.

  2. #22
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,771
    Rep Power
    25

    Default

    Glad you figured it out.

  3. #23
    rowanabejjani is offline Member
    Join Date
    Jun 2011
    Posts
    19
    Rep Power
    0

    Default

    thx :):) i would like to ask you how you put a jframe class in Jpanel from another class,
    exemple i have a class extends Jframe i want to import it to the Jpanel of another Class

  4. #24
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,771
    Rep Power
    25

    Default

    how you put a jframe class in Jpanel
    I'm not sure you can add a JFrame to a JPanel.
    Is there some other way to do it?

Page 2 of 2 FirstFirst 12

Posting Permissions

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