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

Report as inappropriate.

edparrish
edparrish presents ...

2011/8/10

Dialogs

This project shows how to use Java dialogs created with JOptionPane in your Greenfoot scenarios. Java dialogs provide an easy way to get user input, such as a name, for use in a scenario.

There are three main types of dialogs supported:
- input dialogs
- confirmation dialogs
- message dialogs

You will see all three used in this scenario.

Instructions:
1. Run the scenario.
2. When the phone rings, answer it by clicking the image.

7957 views / 939 in the last 7 days

5 votes | 0 in the last 7 days

Tags: demo with-source gui cabrillo

open in greenfoot

There is no HTML 5 translation of this scenario available.
View legacy version (requires Java plugin)

This scenarios uses Java features that are not available for use after conversion to HTML 5. Please try the legacy version, which requires the Java plugin to be installed.

A new version of this scenario was uploaded on Wed Aug 10 00:35:48 UTC 2011 Unlocked the scenario.
A new version of this scenario was uploaded on Wed Aug 10 00:52:50 UTC 2011 Adjusted the screenshot.
A new version of this scenario was uploaded on Thu Aug 11 03:24:26 UTC 2011 Shrunk the size of the world.
A new version of this scenario was uploaded on Thu Aug 11 03:27:50 UTC 2011 Shrunk the size of the world even more.
A new version of this scenario was uploaded on Thu Aug 11 03:29:59 UTC 2011 Restored the size of the world to its default.
MatheMagicianMatheMagician

2012/5/29

Thanks, I used this in my image drawer program.
edparrishedparrish

2012/5/30

You are welcome!
A new version of this scenario was uploaded on 2017-11-25 05:44:25 UTC

Want to leave a comment? You must first log in.

Who likes this?

joandvgv davemib123 a_quiet_person MatheMagician Busch2207