Assignment #3: Time to put the G in GUI
When you feel ready to bone up on GUIs, you can tackle this one:
Write a program that displays two text fields and a button in a frame; the layout is up to you. When the button is pressed, it should take the contents from the first text field and display them reversed in the second text field.
Here's a quick mock-up as an example:
Extra Credit: Write it with Swing (pictured), then write it again using the AWT.
Bonus Extra Credit: Write it as one program that takes an input argument on the command line, either -swing or -awt, and display the frame using the appropriate toolkit. Share as much code as possible between the two implementations. Don't get hung up on this one, the important thing here is to expose you to windowing programming.
0 Comments:
Post a Comment
<< Home