A First Look at GUI Applications Part IV: Radio Buttons 1.

Slides:



Advertisements
Similar presentations
1 Chapter 8 Objects and Classes Lecture 2 Prepared by Muhanad Alkhalisy.
Advertisements

Part 3 Module 6 Units of Measure in Geometry. Linear Measure Linear measure is the measure of distance. For instance, lengths, heights, and widths of.
Chapter 6 Graphical User Interface (GUI) and Object-Oriented Design (OOD)
June 1, 2000 Object Oriented Programming in Java (95-707) Advanced Topics 1 Lecture 9 Object Oriented Programming in Java Advanced Topics Abstract Windowing.
Flowchart Start Input weight and height
Liang, Introduction to Java Programming, Sixth Edition, (c) 2007 Pearson Education, Inc. All rights reserved L03 (Chapter 15) Creating.
Chapter 13: Advanced GUIs and Graphics J ava P rogramming: From Problem Analysis to Program Design, From Problem Analysis to Program Design, Second Edition.
Advanced Java and Android Programming Day 1: Introduction to GUI Programming Intro to GUI Programming1.
GUI Basics: Introduction. Creating GUI Objects // Create a button with text OK JButton jbtOK = new JButton("OK"); // Create a label with text "Enter your.
Chapter 13 Advanced GUIs and Graphics. Chapter Objectives Learn about applets Explore the class Graphics Learn about the class Font Explore the class.
JLabel, JTextField, JButton and JOptionPane
Chapter 8: Writing Graphical User Interfaces
Java Programming: From Problem Analysis to Program Design, 4e Chapter 12 Advanced GUIs and Graphics.
A First Look At GUI Applications Chapter Introduction Many Java applications use a graphical user interface or GUI (pronounced “gooey”). A GUI.
Introduction to GUI in Java 1. Graphical User Interface Java is equipped with many powerful,easy to use GUI component such as input and output dialog.
Chapter 8: Writing Graphical User Interfaces Visual Basic.NET Programming: From Problem Analysis to Program Design.
Chapter 12: A First Look at GUI Applications Starting Out with Java: From Control Structures through Objects Fifth Edition by Tony Gaddis.
© 2010 Pearson Addison-Wesley. All rights reserved. 7-1 Chapter Topics Chapter 7 discusses the following main topics: –Introduction –Creating Windows –Equipping.
Starting Out with Java: From Control Structures through Objects.
By: Stag and Fish; Party Animals.  Radio buttons are a way of letting users choose only one option of a list.
Dimensional Analysis or Unit Analysis
CC1007NI: Further Programming Week 6-7 Dhruba Sen Module Leader (Islington College)
Dale Roberts GUI Programming using Java - GUI Components Dale Roberts, Lecturer Computer Science, IUPUI Department of Computer.
1 Chapter Nine Using GUI Objects and the Visual Studio IDE.
1 Creating Windows GUIs with Visual Studio. 2 Creating the Project New Project Visual C++ Projects Windows Forms Application Give the Project a Name and.
CS324e - Elements of Graphics and Visualization Java GUIs - Event Handling.
Graphical User Interface You will be used to using programs that have a graphical user interface (GUI). So far you have been writing programs that have.
Topics Introduction Scene Graphs
Session 8: Working with Form iNET Academy Open Source Web Development.
GUI Applications ButtonGroup and JRadioButton. Contents A.Problem: The Metric Converter Application B.Solution C.Exercise: Moving all calculations into.
Copyright © 2010 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Programming Logic & Design Second Edition by Tony Gaddis.
Multiple Unit Multipliers Conversion of Units of Area
GUIs Graphical User Interfaces. Everything coming together Known: – Inheritance – Interfaces – Abstract classes – Polymorphism – Exceptions New: – Events.
Introduction to Java Chapter 9 - Graphical User Interfaces and Applets1 Chapter 9 Graphical User Interfaces and Applets.
GUI Basics. Agenda What GUI How to make in java Creating frames Frequently used GUI components Layout Managers.
Java the UML Way versjon Only to be used in connection with the book "Java the UML Way", by Else Lervik and.
Creating User Interfaces Chapter 13 CSCI CSCI 1302 – Creating User Interfaces2 Outline Introduction Common Features of Swing GUI Components Buttons.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 7: A First Look at GUI Applications Starting Out with Java From Control.
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Java: From Control Structures through Objects Third Edition.
Ajmer Singh PGT(IP) JAVA IDE Programming - I. Ajmer Singh PGT(IP) GUI (Graphical User Interface) It is an interface that uses a graphic entities along.
Graphical User Interfaces Tonga Institute of Higher Education.
Java Programming, Second Edition Chapter Thirteen Understanding Swing Components.
TIU Note Templates. Learning Objectives Discuss Human Factor Internationals (HFIs) recommendations for Text Integration Utility (TIU) Templates Become.
Lecture 33: More Graphical User Interface (GUI) Announcements & Review Read Ch GU1 & GU2 Cohoon & Davidson Ch 14 Reges & Stepp Lab 10 set game due 4/26.
Event Handler Methods Text field Object Responder JAVA AWT Environment: Messages are sent between JAVA Objects Screen Event Notification Press Button.
Knowledge Base. Defining a Variable Dim statement Dim intXX As Integer Public in a Module Public dblNN As Double.
Chapter 1.3 Conversion Factors and Unit Cancellation.
TIU Note Templates. Learning Objectives Discuss Human Factor Internationals (HFIs) recommendations for Text Integration Utility (TIU) Templates Become.
Introduction to GUI in 1 Graphical User Interface 3 Nouf Almunyif.
CIS 270—Application Development II Chapter 11—GUI Components: Part I.
CHAPTER 12 A First Look at GUI Applications Copyright © 2016 Pearson Education, Ltd.
Prepared by: Dr. Abdallah Mohamed, AOU-KW Unit 6 Graphical user interfaces 1.
Advanced OOP MCS-3 OOP BSCS-3 Lecture # 7. GUI Components - > Jframe ->JPasswordField (javax.Swing.JPasswordField) GUI Components - > Jframe ->JPasswordField.
Test Title Test Content.
A First Look at GUI Applications Radio Buttons and Check Boxes
Advanced User Interfaces
Chapter Topics 15.1 Graphical User Interfaces
Chapter 13: Advanced GUIs and Graphics
Chapter 14 JavaFX Basics Dr. Clincy - Lecture.
Tooltip -Radio Button.
Customary Measurement Customary Measurement
Chapter 15: GUI Applications & Event-Driven Programming
Investigation 1.2: Measurement
Zhen Jiang West Chester University
Click to edit title TO ADD NEW SLIDE LAYOUTS: Make sure you have the ‘Home’ tab selected at the top of the PowerPoint screen and click the down facing.
Chapter 8 Objects and Classes Part 2
Advanced GUIs and Graphics
TA: Nouf Al-Harbi NoufNaief.net :::
TA: Nouf Al-Harbi NoufNaief.net :::
Presentation transcript:

A First Look at GUI Applications Part IV: Radio Buttons 1

Contents A.What is Radio Button? B.Metric Converter Example 2

A. What is Radio Button?  Radio buttons allow the user to select one choice from several possible options  The JRadioButton class is used to create radio buttons  JRadioButton constructors: JRadioButton(String text) JRadioButton(String text, boolean selected)  Method isSelected() is for checking selection  An instance of the ButtonGroup class is used to group radio buttons 3

B. Metric Converter Example  Reuse the kilometer converter example  Convert the distance to feet: 1 kilometer = 3281 feet  Convert the distance to inches: 1 kilometer = inches  The new interface is as below: 4

B. Metric Converter Example 1.Enhancing the Design 2.Enhancing the KilometerConverterTest Class 3.Enhancing the KilometerConverter Class 4.Creating the Interface 5

1. Enhancing the Design 6

2. Enhancing the KilometerConverterTest Class 7

3. Enhancing the KilometerConverter Class 8

4. Creating the Interface 4.1. Creating the Activating Class 4.2. Creating the Window 9

4.1. Creating the Activating Class  Class name: MetricConverterProgram  The window’s basic properties: Class name: MetricConverter Title: Metric Converter Size: 400 x

4.2. Creating the Window Generating the Window Creating the Components Grouping the Radio Buttons Converting to Miles Converting to Feet Converting to Inches 11

Generating the Window 12

Creating the Components  Use FlowLayout for this case 13

Grouping the Radio Buttons  Only one radio button is chosen at the same time 14

Converting to Miles 15

Converting to Feet 16

Converting to Inches 17