It doesn't really work here on the gallery.
I'm getting an exception:
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.substring(Unknown Source)
at Finder.act(Finder.java:46)
at greenfoot.core.Simulation.actActor(Simulation.java:503)
at greenfoot.core.Simulation.runOneLoop(Simulation.java:466)
at greenfoot.core.Simulation.runContent(Simulation.java:199)
at greenfoot.core.Simulation.run(Simulation.java:187)
Yes, the console should output the day today, whether the day was parsed correctly (and if so, what the result of the parse was), the values of both your birthday and today's date, and your birthday.
The 1210 I'm not entirely sure about...
A new version of this scenario was uploaded on Mon Jan 10 23:52:51 UTC 2011
Seems to be outputting the correct information now. Fixed it so the NullPointerException doesn't occur if you click cancel.
Birthday's should be calculated near-perfect now.
A new version of this scenario was uploaded on Tue Jan 11 02:04:24 UTC 2011
Tells you what day (Monday through Sunday) you were born on.
A new version of this scenario was uploaded on Tue Jan 11 02:08:19 UTC 2011
Wishes you a happy birthday on the day before your birthday.
Might be nicer if you changed it to work with Greenfoot actors rather than swing dialogs? There's a new constructor on GreenfootImage in 2.0.1 that should make this easy, and it saves dialogs popping up all over the place (sometimes they appear on a completely different monitor for me!)
Sounds good. I was originally planning on getting the birthday through the JOptionPane and then drawing the information onto the world canvas, but I got lazy. I'll change it to be all with Greenfoot Actors though.
Thanks for the feedback
2011/1/8
2011/1/10
2011/1/10
2011/1/10
2011/1/10
2011/1/11
2011/1/11
2011/1/11