0% found this document useful (0 votes)
77 views2 pages

06 Laboratory Exercise 1 - ARG

Uploaded by

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

06 Laboratory Exercise 1 - ARG

Uploaded by

ittoyakuza
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Name: Joshua S.

Aleguiojo Section: BSIT 2-1BP

Laboratory Exercise
User Interface Development
3. Re-examine the program that you created during the demonstration and answer the
following questions:

a. On what specific part of the program were the java.awt and javax.swing packages
used? Explain how.
- The java.awt package contains cl asses for creating and managing GUI
components, layouts, colors, and fonts while the javax.swing package provides
components for building a graphical user interface with richer and more flexible
components than java.awt. In summary, java.awt is used for layout
management, colors, fonts, and event handling, while javax.swing is used to
construct the main GUI components like frames, panels, labels, buttons, and text
areas. Together, these packages provide the framework for the graphical user
interface and functionality of this program.
b. On what specific part of the program was the java.awt.event package used?
Explain how.
- The java.awt.event package in this program is specifically used to handle
button click events, enabling it to respond to user interactions. Each button
(btnFindIp, btnClear, and btnOkay) has an associated ActionListener that
defines what actions should occur when the button is clicked. The ActionListener
interface, implemented by inner classes, requires the actionPerformed method,
which is automatically invoked during a button click. The btnFindIp button uses
the BtnFindIpListener class to retrieve the host address entered by the user,
fetch its IP address, and display the result in outputArea. The btnClear button
has the BtnClearListener class, which clears the input and output fields, resets
the btnFindIp button, and hides the output frame. Lastly, the btnOkay button
utilizes the BtnOkayListener class to clear the fields, re-enable btnFindIp, and
hide the output frame. By using java.awt.event.ActionListener for each button,
the program can effectively manage different actions based on which button is
pressed, providing a dynamic response to user actions.

4. In line with the concept of the program that you created (a program that generates
IP address), search for at least one (1) framework that can be used in creating the
same program. Explain how you will implement the framework.
- A suitable framework for creating a program that retrieves IP addresses is
JavaFX. JavaFX provides a modern, flexible platform for building rich GUI
applications in Java and offers enhanced features, such as built-in support for
CSS styling and FXML for defining UIs. To implement this program in JavaFX,
we would first set up a main Stage (window) and a Scene that includes a
TextField for inputting the host address, a Button to trigger the IP lookup, and a
TextArea to display the result. The event handling can be managed using lambda
expressions for cleaner, more concise code. When the button is clicked, an
EventHandler retrieves the input host address, fetches the IP address using
InetAddress, and displays it in the TextArea. JavaFX’s layout options, like VBox
and HBox, would organize these components, and styling can be managed easily
through CSS. This approach would allow for a visually appealing and responsive
GUI, making the program more intuitive and adaptable across platforms.

5. After re-examining the program and finding another suitable framework, search for
at least five (5) mobile user interface (UI) toolkits which are not included in 06
Handout 1. Provide the following details for each toolkit:
a. Toolkit name
- Flutter
b. Toolkit creator/developer
- Google
c. Short toolkit description
- Flutter is Google’s UI toolkit for building natively compiled applications for
mobile, web, and desktop from a single codebase, using the Dart language. It
provides customizable widgets that support fast, visually appealing UIs.
d. Base on your understanding, how will this toolkit help developers and designers
create a better user interface? Cite some examples, if possible.
- Flutter enhances UI creation by providing developers and designers with a
flexible, visually rich toolkit featuring customizable widgets, hot-reload, and
advanced animation support. Its extensive library of customizable widgets allows
designers to create polished, brand-consistent elements across platforms, while
hot-reload speeds up the iteration process, enabling real-time changes without
restarting the app. With a single codebase, Flutter ensures consistent design
across mobile, web, and desktop platforms, giving users a unified experience.
Additionally, Flutter’s pixel-perfect control and robust animation capabilities
allow for smooth transitions, custom animations, and micro-interactions,
creating dynamic, engaging interfaces that improve user satisfaction and
engagement.

You might also like