Presentation is loading. Please wait.

Presentation is loading. Please wait.

GUI Applications ButtonGroup and JRadioButton. Contents A.Problem: The Metric Converter Application B.Solution C.Exercise: Moving all calculations into.

Similar presentations


Presentation on theme: "GUI Applications ButtonGroup and JRadioButton. Contents A.Problem: The Metric Converter Application B.Solution C.Exercise: Moving all calculations into."— Presentation transcript:

1 GUI Applications ButtonGroup and JRadioButton

2 Contents A.Problem: The Metric Converter Application B.Solution C.Exercise: Moving all calculations into a separate class

3 A. Problem: The Metric Converter App Develop a GUI that allows the user to enter a distance in kilometers, and then click on radio buttons to see that distance converted to miles, feet, or inches The conversion formulas are Miles = Kilometers  0.6214 Feet = Kilometers  3281.0 Inches = Kilometers  39370.0

4

5 B. Solution 1.Developing the View 2.Developing test cases 3.Implementing event handlers for the radio buttons

6 1. Developing the View Project name: Metric Converter Class name: MetricConverterView Package: metricconverter Frame title: Metric Converter GUI components –The Km panel 1 Label 1 Text field –The button panel 1 Button group 3 radio buttons

7

8 2. Developing test cases 2 kilometers = 1.2428 miles = 6562.0 feet = 78740.0 inches

9 3. Implementing event handlers for the radio buttons

10 C. Exercise: Moving all calculations into a separate class

11 The View & Controller

12 The Model

13 References 1.GUI Building in NetBeans IDE 5.5. http://testwww.netbeans.org/kb/55/quicks tart-gui.html http://testwww.netbeans.org/kb/55/quicks tart-gui.html 2.Starting Out With Java 5 from control structures to objects. Tony Gaddis


Download ppt "GUI Applications ButtonGroup and JRadioButton. Contents A.Problem: The Metric Converter Application B.Solution C.Exercise: Moving all calculations into."

Similar presentations


Ads by Google