This site requires JavaScript, please enable it in your browser!
Greenfoot
Username
Password
Remember Me?
Sign Up, Lost Password
Activity
About
Documentation
Download
Discuss
Scenarios
Discussions
You need to login to take part
Current Discussions
centering JOptionPane message
By Alwin_Gerrits, with 4 replies.
Last reply by Alwin_Gerrits, almost 11 years ago:
True, I think just leaving JOptionPane might be better, but seen I'm using it allthroughout my game I don't think it will look well if I start using a differend looking panel all of the sudden. Thanks though danpost, I'll defiëntly keep it in mind for future projects.
A complicated problem with scores
By GreenCompiler, with 9 replies.
Last reply by GreenCompiler, almost 11 years ago:
Thanks for all the advice you've given me. ^^ I've been able to solve the problems I had now. It's still a bit rough around the edges but my game is doing what its supposed to do now.
Using the built in ScoreBoard + UserInfo to track top scores
By Gish, with 2 replies.
Last reply by Gish, almost 11 years ago:
I'm not sure how you do it, danpost, but you always seem to be able to help. I don't know why I overlooked that conditional statement for adding the scoreboard only once. I also tried this with a new user name, and it all seems to be working perfectly. Just a few more tweeks and Ill be ready to submit. Thanks again.
Changing font inside of a score counter
By RawbyTheSheeth, with 1 reply.
Replied to by danpost, almost 11 years ago:
I do not know how easy it would be to change the default font of a new GreenfootImage object (if it is at all possible). However, I have a subclass for the GreenfootImage class that makes text images that use a given font. It is located in my
TextImage Support Class
scenario.
Need help with a scrolling world
By Sranang, with 1 reply.
Replied to by Super_Hippo, almost 11 years ago:
<Code Omitted> You could do it like this.
Having difficulties with randomly moving objects
By cha0204, with 8 replies.
Last reply by Super_Hippo, almost 11 years ago:
The 'resetBoolean' method is needed as you do it. (In my scenario I just set them to 'true' or 'false' every time, but you can also do it like this. The 'changeDirections' method... well, I was thinking of something like this:
jump
By amit_27980, with 1 reply.
Replied to by danpost, almost 11 years ago:
What code have you tried?
New JFrame
By JetLennit, with 4 replies.
Last reply by NikZ, almost 11 years ago:
Super_Hippo wrote...
I don't know what a JFrame is. I think I saw it once when testing out Eclipse, but I didn't understand anything there, so I moved back to Greenfoot where I don't need such things... Did you update to Java 8? Maybe this causes the problem like it blocks the storage. But it could be completely different, just an idea. ;)
It is a pop up box/frame. Add JComponent to it for content.
Create an exception to some classes
By MySelfLuls, with 6 replies.
Last reply by danpost, almost 11 years ago:
Line 1: * the 'enhanced for' (or 'for each') loop -- see lower half of
this page
* the 'getObjectsAtOffset' method-- see
Actor class documentation
* the 'removeAll' method -- see
List class documentation
Line 3 assigns the object from the resultant list to an Actor field. This is so the object will be looked upon as an Actor object, not just an Object object (necessary b
Character goes through the platform (from below)
By sunjay001, with 1 reply.
Replied to by Super_Hippo, almost 11 years ago:
If the onGround works, you can probably write similar code to check for above the player. There is probably something like 'getOneObjectAtOffset(0,/*something positive*/, Ground.class)'. If you change the positive value to a negative one, it will check above the player.
Is there a method or command to open up the java documentation?
By BryanGSMST, with 1 reply.
Replied to by danpost, almost 11 years ago:
If you mean something like what
this scenario
does, then, well, yes; but it is not a command or method, it is a button actor (in one world) and a world subclass that displays a text file (in another world). You will need to add a '.txt' file to your scenario folder by opening up the '.java' class file and saving it in the same folder as a '.txt' file if you want an uploaded version to work properly (the '.java' files are not placed into the scenario folder on the site, but any extra '.txt' files will be placed there).
'(' expected?
By Fuzzion, with 2 replies.
Last reply by danpost, almost 11 years ago:
The following line is incomplete: <Code Omitted>It should be: <Code Omitted>with a set of open and close parenthesis after the name of the method.
Problem by using scenarios with UserInfo
By Busch2207, with 2 replies.
Last reply by Busch2207, almost 11 years ago:
Ah, ok! :) Thank you, that really helped! :)
to make a transparant graphic
By Nirmala, with 13 replies.
Last reply by danpost, almost 11 years ago:
Yes. After adding the 'TScreen' world and having that be the initial world, the 'started' method in the 'world' world is no longer executed (the project is not started with that world being the active world). Just add the line: <Code Omitted>as the last line in the 'world' class constructor ('public world()').
possible to combine objects by glueing them together?
By 11770, with 10 replies.
Last reply by 11770, almost 11 years ago:
alright although I have run out of time for the project as I have no more free time until its due haha i'd like to finish it I already meet the req to get 100% thank you guys
638
639
640
641
642
643
644
X