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

Report as inappropriate.

NikZ
NikZ presents ...

2014/8/5

ColorMaker

Backspace for presets, and enter to make your own.

1699 views / 464 in the last 7 days

1 vote | 0 in the last 7 days

Tags: rgb nikz

This scenario is a member of: Utility by NikZ


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.

NikZNikZ

2014/8/5

Hmmm, enter doesn't work, but in the greenfoot file it does.
A new version of this scenario was uploaded on Tue Aug 05 03:37:32 UTC 2014 Hoping this will fix the bug.
NikZNikZ

2014/8/5

Nope, the deleting of the auto stop didn't work.
danpostdanpost

2014/8/5

I had no problem with backspace or enter.
NikZNikZ

2014/8/5

When I pressed enter and put in "32" in the red input, the scenario had a run time error (stopped), but I don't know what's the cause because it works just fine in editing.
danpostdanpost

2014/8/5

I think you are required to key a number in for the other color parts (at least zeroes, if that is the value you want for them). You could programmatically account for an empty return string. I do not know if setting a default '0' value for the inputs would be enough.
NikZNikZ

2014/8/5

After asking for the red number, it should ask for green number, than blue. Even if I put in an abstract character like '~,' in editing, I won't get the error message until after all three questions have popped up. Here, if I put anything in, the scenario will crash. There is no terminal, so I don't know the error. Some of my code: String r = JOptionPane.showInputDialog("Red number:"); for (int x = 0; x < r.length(); x++) { char i = r.charAt(x); if (Character.isAlphabetic(i)) { JOptionPane.showMessageDialog(null, "Must be numeric!"); return; } if (x >= 3) { JOptionPane.showMessageDialog(null, "Too long!"); return; } }

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

Who likes this?

jamiefitz94