Java User Interfaces
The goal of today's lab is to practice implementing Graphical User
Interfaces in Java.
Resources
Note that the Java GUI framework makes extensive use of inheritance.
This can make reading the documentation difficult because a majority of
methods only appear in the "Methods inherited from ..." section of the
JavaDocs.
Decoder Ring
The file DecoderRing.java includes
utility methods for encrypting and decrypting messages using a simple
substitution cipher.
Your task today is to create a GUI application that makes it easy for
a user to encrypt and decrypt messages using the methods provided
by DecoderRing.java
. You are free to
design your application however you want, within the following
constraints:
- All input and output must be handled within a single window — your
application should not interact with the user by popping up
JOptionPanes.
- All text areas and buttons must be labeled.
- Your application must contain separate text fields for the
message to encode/decode and the result of encoding/decoding. The
result field must be read-only.
- The GUI must provide the user with a way to select an integer
key value.
- Use should not use a GUI-Building tool
like Netbeans
or WindowBuilder.
Those tools are very useful, but you need to be able to understand the
code they generate.
- You do NOT need to worry about error handling. For example, you
may assume that the user will enter a valid integer for the key.
Submit your completed .java files when you are finished.