0% found this document useful (0 votes)
6 views6 pages

Java GUI Application Development Guide

This document serves as a guide for developing Java applications with a focus on creating Graphical User Interfaces (GUIs). It includes exercises for building interactive applications such as a login form, temperature converter, product management system, and a demo for a supermarket product module. The guide emphasizes the importance of practice and collaboration while utilizing Java's graphical component library, Swing.

Translated by

ScribdTranslations
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views6 pages

Java GUI Application Development Guide

This document serves as a guide for developing Java applications with a focus on creating Graphical User Interfaces (GUIs). It includes exercises for building interactive applications such as a login form, temperature converter, product management system, and a demo for a supermarket product module. The guide emphasizes the importance of practice and collaboration while utilizing Java's graphical component library, Swing.

Translated by

ScribdTranslations
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Argentina

program

Development of
JAVA applications

Guide II-Exercises

Graphical Interface of
User
LEARNING EXERCISES

We are excited to begin this new chapter in which we will explore the fascinating
world of Graphical User Interfaces (GUI) in the Java programming language. During
In this unit, we will learn to create interactive and engaging applications that will allow users to
users interact intuitively with our programs.
GUIs are fundamental in modern software development as they provide a way
visually appealing and easy to use for presenting information and receiving user input.
Throughout this course, we will discover the tools and techniques necessary to design and
build effective graphical interfaces using the Java graphical component library,
such as JFrame, JPanel, and JButton, among others.

Our main objective is to provide them with the knowledge and skills necessary to create
aplicaciones Java con interfaces atractivas y funcionales. Aprenderemos sobre la disposición de
the elements in the window, the capturing of user events, the creation of buttons, fields of
text, progress bars, and many other useful components.
In addition, we will explore key concepts such as the event model, the interaction between different
components and the customization of the appearance of our applications. We will also have
the opportunity to work on practical projects that will test our skills and
they will consolidate what they have learned.

Remember that practice and experimentation are essential for truly understanding.
how GUIs work in Java. So don't be afraid to explore, ask questions and
collaborate with your teammates.
We are confident that this unit will be an exciting and enriching experience.
Get ready to dive into the visual world of Graphic User Interfaces in Java and
Enjoy the process of creating interactive and engaging applications!
Good luck and have fun programming!

We suggest watching the videos related to this topic before starting.


Exercises can be found in your virtual classroom or on our YouTube channel.
Exercise 1:
Create a GUI application in Java that simulates a login form. The interface must contain the
following elements:
A text field (JTextField) for the user to enter their email.
A text field (JTextField) for the user to enter their password.
3. A button (JButton) with the text 'Register'.
When the user clicks the 'Register' button, the application should display a dialog.
emergency (JOptionPane) with a welcome message if the email is equal toalumno@[Link]
and the password is equal to '12345678', otherwise the message should say 'User and/or password'
incorrect.
Remember that you must use the Java Swing graphical component library to create the
interface and manage the button events.

Exercise 2:
Create a GUI application in Java that simulates a temperature unit converter.
the interface must contain the following elements:
1. A text field (JTextField) for the user to enter the temperature in degrees.
Celsius.
2. A button (JButton) with the text "Convert".
When the user enters the temperature in degrees Celsius and clicks on the 'Convert' button, the
the application must convert Celsius to Fahrenheit and display the result in a box
of emerging dialogue.
The formula to convert from degrees Celsius to Fahrenheit is: Fahrenheit = Celsius * 9/5 + 32.
Remember to use the Java graphical component library (Swing) to create the interface and
manage the button event.

Exercise 3:
Create a GUI application in Java that manages a list of products. The interface must contain
the following elements:
A ComboBox (JComboBox) that allows the user to select a product category
from a predefined list (for example, electronics, clothing, food, etc.).
A button 'Add product' (JButton) that allows the user to add a new product
to the list.
3. A table (JTable) that displays the added products, with columns for the name of the
product, the category and the price.
When the user selects a category in the ComboBox and clicks the 'Add' button
product", the program must allow the user to enter the name and price of the product in
separated text fields. Then, you must add the product to the table with the category
selected.
In addition, the table must be updated automatically every time a new product is added.
Exercise 4:
The supermarket 'DeTodo SA' has asked us to create a demo of the products module that allows:
register, cancel, and modify products of the establishment and a series of queries regarding them
products by: category, name, and prices. For each product, it is important to know: code (numeric),
descripción, precio, stock y rubro (comestible, limpieza y perfumería son los únicos permitidos).
To address this requirement, we will implement a TreeSet of Products in
where we will have them sorted by code as they are entered.
Below we show the suggested views for the general menu, product management and
for the requested inquiries.
It is important to distribute tasks among team members in such a way that: one creates
repository on GitHub; others clone it, then each one does one of the classes that are part of it
of the project and upload the changes to the repository.

General menu

Product management:
Inquiries by Category:

Consult by name:
Price inquiry:

You might also like