This site requires JavaScript, please enable it in your browser!
Greenfoot back

Comments for test of build-in panel

Return to test of build-in panel

A new version of this scenario was uploaded on Mon Aug 06 13:31:13 UTC 2012
gusbus123gusbus123

2012/8/7

so this is supposed to have items keep moving even though the game is paused?
yedefeiyedefei

2012/8/7

In fact, it walks around the act() of world ,and maintains the game loop with a thread
gusbus123gusbus123

2012/8/7

ok.
SPowerSPower

2012/8/7

@yedefei About the multi threading part: I also used to think this would just be fine, but clearly, it isn't. None of Greenfoot APIs are thread safe, so you have to do much work to let it be safe. Davmac told me this, and has a useful scenario: http://www.greenfoot.org/scenarios/1963 to show the amount of code for thread safety. If you want to do more with threads, you should really dive into the books. Just some big advice from me
yedefeiyedefei

2012/8/7

thanks,and another question: how to get the focus of my panel?e.g. In this demo ,there is no responding when I press keys until clicking the panel of mine ,how to solve?
SPowerSPower

2012/8/7

If you really want to get access the the JPanel of the World, look at this scenario: http://www.greenfoot.org/scenarios/2828 but if I were you, just import: import greenfoot.*; and use the default Greenfoot APIs.
SPowerSPower

2012/8/7

Btw you can use the JPanel of the World to listen to the keyboard :)
A new version of this scenario was uploaded on Tue Aug 07 13:30:48 UTC 2012
yedefeiyedefei

2012/8/7

thanks,i solve 。
A new version of this scenario was uploaded on Sun Aug 19 12:54:24 UTC 2012 add function for switching between two games
A new version of this scenario was uploaded on Sun Aug 19 12:57:31 UTC 2012 add function for switching between two games
A new version of this scenario was uploaded on Sun Aug 19 13:00:14 UTC 2012 add function for switching between two games
A new version of this scenario was uploaded on Sun Aug 19 13:03:14 UTC 2012 add function for switching between two games
A new version of this scenario was uploaded on Sun Aug 19 13:05:24 UTC 2012
A new version of this scenario was uploaded on Sun Aug 19 13:07:34 UTC 2012 add function for switching between two games
A new version of this scenario was uploaded on Sun Aug 19 13:11:47 UTC 2012 add function for switching between two games
A new version of this scenario was uploaded on Sun Aug 19 14:10:12 UTC 2012 add function for switching between two games
A new version of this scenario was uploaded on Mon Aug 20 01:20:02 UTC 2012
A new version of this scenario was uploaded on Mon Aug 20 01:49:59 UTC 2012
A new version of this scenario was uploaded on Mon Aug 20 01:59:09 UTC 2012
A new version of this scenario was uploaded on Mon Aug 20 02:04:15 UTC 2012
A new version of this scenario was uploaded on Mon Aug 20 03:39:13 UTC 2012
A new version of this scenario was uploaded on Mon Aug 20 03:42:21 UTC 2012
A new version of this scenario was uploaded on Mon Aug 20 03:49:16 UTC 2012
A new version of this scenario was uploaded on Mon Aug 20 03:51:38 UTC 2012
A new version of this scenario was uploaded on Mon Aug 20 04:08:25 UTC 2012
A new version of this scenario was uploaded on Mon Aug 20 04:23:21 UTC 2012
A new version of this scenario was uploaded on Mon Aug 20 04:35:18 UTC 2012
A new version of this scenario was uploaded on Mon Aug 20 06:07:50 UTC 2012
A new version of this scenario was uploaded on Mon Aug 20 06:12:40 UTC 2012
A new version of this scenario was uploaded on Mon Aug 20 06:18:31 UTC 2012
A new version of this scenario was uploaded on Mon Aug 20 06:31:59 UTC 2012
A new version of this scenario was uploaded on Mon Aug 20 10:09:14 UTC 2012
A new version of this scenario was uploaded on Mon Aug 20 10:11:20 UTC 2012
A new version of this scenario was uploaded on Mon Aug 20 10:12:33 UTC 2012
A new version of this scenario was uploaded on Mon Aug 20 10:15:07 UTC 2012
A new version of this scenario was uploaded on Mon Aug 20 10:18:05 UTC 2012
A new version of this scenario was uploaded on Tue Aug 21 07:44:58 UTC 2012