Explore BrainMass

Java applet, converting character to integer(vice versa) - ASCII

I guess my biggest issue is actually to draw a functionable applet.

Design an applet that converts a character to a corresponding integer, and vice versa. The integer corresponding to a character is its ASCII code.
The design should look as the attached picture.

The applet has to have the following functionality:

* After entering a character into the left text field and pressing the "Enter" button, the ASCII code should appear in the right text field.
* If the user enters not a single character, a warning not a character should appear in red color.
* After entering an ASCII code in the range [33..126] into the right text field, the corresponding character should appear in the left text field.
* If the user enters an integer outside the range [33..126], a warning number out of range should appear in red color.
* If the user enters not an integer in the right text field, a warning not a number should appear in red color.
* If the conversion is successful, a confirmation conversion completed should appear in white color.

The applet size is 200x100 pixels.
The the width of the input fields is 1 and 3 characters, respectively.

Thank you


Solution Summary

A Java applet for converting character to integers and vice versa is examined.