GUI Test Information Outline One programming problem written
GUI Test Information
Outline • One programming problem – written using Blue. J. • Printing code when finished but also executing the program. • You will only need to use one class but code should be well organized with appropriately named variables. • Comments describing methods and variables will be required.
GUI components • Layout Managers: Flow. Layout, Grid. Layout, Border. Layout • Components: Panel, Button, Label, Textbox
Reference Card • Hand written • It should contain information around the creation of a JFrame, Layout Managers, Action Listeners and Swing Components. • Import statements? • What else? ? ?
AP students • Your question will contain some math operations possibly including: - add, subtract, multiply, divide - squaring, square rooting - absolute value
Practice Problem: Guess My Number • Set up the Window with panels using Border. Layout (using Labels, Textboxes, and Buttons) Rules: • Computer generates a random number between 1 – 100. • User guesses by entering a value into a textbox • Computer gives feedback like: “Too high” “Too low” or “You got it!” • GUI also contains a “Play Again? ” button. • Bonus: Add in feedback like: “You’re getting warmer” , etc. depending on how far off the guess is from the actual number
- Slides: 6