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
Pop-up message
By StndRed, with 7 replies.
Last reply by Super_Hippo, almost 5 years ago:
You can use the Color class provided by Greenfoot. It is very similar to java.awt.Color. You have to create an image, set the color and then use the drawString method to draw text with the given text color to the background. However, if the text on the image is everything you need, it might be enough to use another constructor for the GreenfootImage class. You can set the text color (‘forgreound’) directly. Check the API here:
https://www.greenfoot.org/files/javadoc/greenfoot/GreenfootImage.html
identifier expected
By divinity, with 3 replies.
Last reply by danpost, almost 5 years ago:
Use "<AbstractButton>" in line 1 (instead of what you put).
Java Exception for my code in Greenfoot
By Freddy05, with 9 replies.
Last reply by RcCookie, almost 5 years ago:
I don’t know - java has ways to invoke JavaScript commands. But as far as I know that also doesn’t work online. But if someone can get that to work that would open a whole new set of options.
How to prevent objects from pushing each other?
By BaseEvoli, with 1 reply.
Replied to by danpost, almost 5 years ago:
BaseEvoli wrote...
Here is the project,
Upload project here providing source codes.
More Colored Code Quiestions
By Gabe1098, with 4 replies.
Last reply by danpost, almost 5 years ago:
Gabe1098 wrote...
what about "short, long, byte, float, char"
They are all different primary types. See
this
page of the java tutorials.
How to properly animate my character?
By BaseEvoli, with 7 replies.
Last reply by danpost, almost 5 years ago:
You may want to check out my
Animation
support class (either for reference or for usage). You can find it
here
.
giving X, Y, and Rotation & calling a method from an actor to myWorld
By Gabe1098, with 10 replies.
Last reply by Gabe1098, almost 5 years ago:
danpost wrote...
Gabe1098 wrote...
I have a new error... it says "method createBullet in class MyWorld cannot be applied to given types: required no arguments: found: int, int, int reason: actual and formal arguments lists differ in length"
Add parameters to the method (line 24) to suit your arguments (those values you are trying to pass to the method).
Ooohhh lol I feel so dumb xD Thanks!
Based on Blue j and greenfoot
By Roshan123, with 3 replies.
Last reply by RcCookie, almost 5 years ago:
No, you can’t do that. The only thing you could do is also share the Greenfoot installation
How can I spawn a Object on another Object
By Prummi, with 1 reply.
Replied to by danpost, almost 5 years ago:
Prummi wrote...
How can I spawn ... Object at the same position where my actor is?
<Code Omitted>
where is the boolean?
By divinity, with 4 replies.
Last reply by danpost, almost 5 years ago:
divinityI wrote...
: am still getting this error here with this line of code: totalpay = ((hoursWorked >= 40) && (hoursWorked <= 1.5)); do I remove or how to fix it
danpost wrote...
Remove lines 8 and 17. Then change line 51 to: <Code Omitted> Line 59 needs parentheses around "getHours() - 40".
Adding text and image and then make it disappear.
By BoondockSaint, with 14 replies.
Last reply by Gabe1098, almost 5 years ago:
BoondockSaint wrote...
Gabe1098 wrote...
you can make a text like this<Code Omitted>
Also thank you. I will try that as well if i still have problems with what I'm doing horribly right know.
oops I'm sorry I should have put setImage instead of showImage
I need help making a grabbing mechanic
By eboy600, with 21 replies.
Last reply by nccb, almost 5 years ago:
The problematic user's account has been disabled and their comments removed.
Making a button visible on my main screen when run is started
By xixEmilyxix, with 2 replies.
Last reply by xixEmilyxix, almost 5 years ago:
I managed to figure it out today, thanks though. Turns out I did not add the add object part into the world code
How to reduce image Size?
By Me.SatishReddy, with 4 replies.
Last reply by Gabe1098, almost 5 years ago:
Me.SatishReddy wrote...
Hello, Is anyone there to help me? I am looking to Reduce the Size of my Image in Actor method...Could someone help me with this problem!!
<Code Omitted>
List sometimes returns NullPointerException
By RoverKnight, with 9 replies.
Last reply by RoverKnight, almost 5 years ago:
Ah I see, thanks for the explanation =)
63
64
65
66
67
68
69
X