You are on page 1of 21

TEMPLATE 4: The Lesson Structure

(Will be used individually during the self-paced write shop)

//Module 4: Lesson 1: Package

//Module 4: Lesson 2: API

Module No. and Title Module 4: Package and Application Programming Interface
Development and Graphical User Interface

Lesson No. and Title Lesson 3: Graphical User Interface Development

Learning Outcomes ILO23. Design user interface.

Time Frame 2 weeks

Introduction Welcome to Module 4 Lesson 3 Graphical User Interface


Development! In this lesson, you will learn how to design user
interface. Designing activities will be accomplished to grasp the
lesson’s concept. This lesson will span for 2 weeks. Enjoy the
lesson while learning at the same time!

Activity Week 1:

Let us start the lesson with an activity. At the end of the activity,
you will be able to make a program that is fully functioning. We
will call this program Swing Counter. Start by following the step-
by-step instructions.

Step 1: Copy the following code to an editor

// This is the start of the Activity code

import java.awt.*;
import java.awt.event.*;
import javax.swing.*;

public class SwingCounter extends JFrame {


private JTextField tfCount;
private JButton btnCount;
private int count = 0;

public SwingCounter() {

Container cp = getContentPane();
cp.setLayout(new FlowLayout());

cp.add(new JLabel("Counter"));
tfCount = new JTextField("0");
tfCount.setEditable(false);
cp.add(tfCount);

btnCount = new JButton("Count");


cp.add(btnCount);

btnCount.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent evt) {
++count;
tfCount.setText(count + "");
}
});

setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setTitle("Swing Counter");
setSize(300, 100);
setVisible(true);
}

public static void main(String[] args) {


SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
new SwingCounter();
}
});
}
}

// This is the end of the Activity code

Step 2: Save, compile, and run the code. You will get a window
with a label “Counter”, a textfield with “0” as the displayed
number, and a button with label “Count”.

Project WRITE XI: An Easy Guide for Course Pack making and Module Development
Figure 4.3.1: Swing Counter Program

Step 3: Click the Count button and see the number displayed in
the textfield changes. Every click on the Count button will
increase the number displayed in the textfield by 1. With your
output you are able to make the Swing Counter program on your
own. You have done this activity successfully. Great job and keep
it up!

Analysis What is an IDE?


What is NetBeans?
What is GUI?
What is Swing in Java?
What is a container class?
What is a Java Swing program template?
How to create project, package, and class using Netbeans?

The activity done will give a bird’s eye view on the capability of
Java in designing graphical user interface that will be shown on
the abstraction phase.

Abstraction What is an IDE?

As part of the GUI development, an IDE which stands for


Integrated Development Environment, aids programmers to join
the different aspects of writing a computer program in a graphical
interface in comparison to the DOS which is text-based only and
purely black and white.

IDEs increase programmer productivity by combining common


activities of writing software into a single application including
the editing of source code, syntax highlighting, autocomplete,
building executables, and debugging.

What is NetBeans?

Project WRITE XI: An Easy Guide for Course Pack making and Module Development
The most common IDE being used in Java programming is the
NetBeans. NetBeans is open-source. It began in 1996 as a Java
IDE student project at Charles University in Prague. It was
acquired by Sun Microsystems in 1999. In 2010, Oracle acquired
Sun including Netbeans. It provides seamless support for Java
Swing and bundled with an excellent profiler for performance
tuning.

To write a Java program using Netbeans, kindly follow


the steps:

1. Launch NetBeans.
2. From "File" menu ⇒ Choose "New Project...".
3. The "Choose Project" dialog pops up ⇒ Under
"Categories", choose "Java" ⇒ Under "Projects", choose
"Java Application" ⇒ "Next".
4. The "Name and Location" dialog pops up ⇒ Under
"Project Name", enter "FirstProject" ⇒ In "Project
Location", select a suitable directory to save your works
⇒ Uncheck "Use Dedicated Folder for Storing Libraries"
⇒ Uncheck "Create Main class" ⇒ Finish.
5. Right-click on "FirstProject" ⇒ New ⇒ Java Class
Project WRITE XI: An Easy Guide for Course Pack making and Module Development
(OR choose the "File" menu ⇒ "New File..." ⇒
Categories: "Java", File Types: "Java Class" ⇒ "Next").
6. The "Name and Location" dialog pops up ⇒ In "Class
Name", enter "Hello" ⇒ Delete the content in "Package"
if it is not empty ⇒ "Finish".
7. The source file "Hello.java" appears in the editor panel.
Enter the following codes:

// This is the start of the Java program code using Netbeans

public class Hello {


public static void main(String[] args) {
System.out.println("Hello, world");
}
}

// This is the end of the Java program code using Netbeans

8. There is no need to "compile" the source code in


NetBeans explicitly, as NetBeans performs the so-
called incremental compilation (i.e., the source statement
is compiled as and when it is entered). To run the
program, right-click anywhere in the source (or from the
"Run" menu) ⇒ Run File. Observe the output on the
output console.
Notes:
 You should create a NEW Java project for EACH of your
Java application.
Nonetheless, NetBeans allows you to keep more than one
programs in a project, which is handy for writing practice
programs. To run a particular program, open and right-click on
the source file ⇒ Run File.

What is GUI?

GUI stands for Graphical User Interface, a term utilized in


programming that help the development of GUIs. A program's
graphical UI presents a simple to-use visual display to the user. It
is comprised of graphical components such as windows, labels,
and buttons through which the user can interact with the page
or application. To make graphical UIs in Java, use Swing API.

What is Swing in Java?

SwingXI:inAnJava is
Project WRITE a Graphical
Easy Guide for CourseUser
Pack Interface
making and(GUI) toolkit
Module that
Development
incorporates a rich set of widgets. It is a part of Java Foundation
Classes (JFC), which is an API for Java programs that provide
GUI. Swing includes packages that let you make a complex set of
GUI components for your Java applications and it is platform-
independent. You can use the Java GUI components like textbox,
buttons, and so forth from the Swing library and do not need to
create the components from scratch.

What is a container class?

Figure 4.3.2: Java Swing class hierarchy diagram

All components in swing are JComponent which can be added to


container classes.

Container classes are classes that can have other components on


it. So for making a GUI, you need one or more container object.
There are 3 kinds of containers. These are the panel, frame, and
dialog. The panel is a pure container and is not a window in itself.
The only purpose of a Panel is to organize the components on to a
window. On the other hand, the frame is a fully functioning
window with its title and icons. Meanwhile, the dialog can be like
a pop-up window that pops out when a message has to be
displayed. It is not a fully functioning window like the Frame.

Week 2:

What is a Java Swing program template?

Project WRITE
// ThisXI:isAn
theEasy
startGuide
of theforJava
Course Packprogram
Swing making and Module Development
template
import java.awt.*; // Using layouts
import java.awt.event.*; // Using AWT event classes and listener
interfaces
import javax.swing.*; // Using Swing components and containers

// A Swing GUI application inherits from top-level container


javax.swing.JFrame
public class ...... extends JFrame {

// Private instance variables

// Constructor to setup the GUI components and event handlers


public ......() {
// Retrieve the top-level content-pane from JFrame
Container cp = getContentPane();

// Content-pane sets layout


cp.setLayout(new ....Layout());

// Allocate the GUI components

// Content-pane adds components


cp.add(....);

// Source object adds listener

setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
// Exit the program when the close-window button clicked
setTitle("......"); // "super" JFrame sets title
setSize(300, 150); // "super" JFrame sets initial size
setVisible(true); // "super" JFrame shows
}

// The entry main() method


public static void main(String[] args) {
// Run GUI codes in Event-Dispatching thread for thread-
safety
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
new ......(); // Let the constructor do the job
}
Project WRITE XI: An Easy Guide for Course Pack making and Module Development
});
}
}

// This is the end of the Java Swing program template

Now, kindly compare the Java Swing program template with the
Swing Counter program activity you have done earlier, side by
side. Notice that the two are very similar as the activity you have
done used the Java Swing program template. Now, look at each
section from the template with its corresponding comments and
review your activity that matches the specific sections. Your
activity program used codes that match the comments found in
the template. Below is the same set of codes that made your
activity program with similar comments to that of the Java Swing
program template.

// This is the start of the Activity code with similar comments to


that of the Java Swing program template

import java.awt.*; // Using layouts


import java.awt.event.*; // Using AWT event classes and listener
interfaces
import javax.swing.*; // Using Swing components and containers

// A Swing GUI application inherits from top-level container


javax.swing.JFrame
public class SwingCounter extends JFrame { // JFrame instead of
Frame
private JTextField tfCount; // Use Swing's JTextField instead of
AWT's TextField
private JButton btnCount; // Using Swing's JButton instead of
AWT's Button
private int count = 0;

// Constructor to setup the GUI components and event handlers


public SwingCounter() {
// Retrieve the content-pane of the top-level container JFrame
// All operations done on the content-pane
Container cp = getContentPane();
cp.setLayout(new FlowLayout()); // The content-pane sets its
layout

cp.add(new
Project WRITE XI: An EasyJLabel("Counter"));
Guide for Course Pack making and Module Development
tfCount = new JTextField("0");
tfCount.setEditable(false);
cp.add(tfCount);

btnCount = new JButton("Count");


cp.add(btnCount);

// Allocate an anonymous instance of an anonymous inner


class that
// implements ActionListener as ActionEvent listener
btnCount.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent evt) {
++count;
tfCount.setText(count + "");
}
});

setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); //
Exit program if close-window button clicked
setTitle("Swing Counter"); // "super" JFrame sets title
setSize(300, 100); // "super" JFrame sets initial size
setVisible(true); // "super" JFrame shows
}

// The entry main() method


public static void main(String[] args) {
// Run the GUI construction in the Event-Dispatching thread
for thread-safety
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
new SwingCounter(); // Let the constructor do the job
}
});
}
}

// This is the end of the Activity code with similar comments to


that of the Java Swing program template

The first part of the code above calls the API package libraries to
use the different layouts, classes, interfaces, components, and
containers.
Project WRITE XI: An Then it creates
Easy Guide a subclass
for Course of Frame
Pack making andthat inherits
Module all the
Development
properties from Frame like content-pane and buttons. Then it
declares variables, creates a constructor to setup the GUI
components, and creates the main method.
The process below is about creating a basic calculator with GUI
implementation using the NetBeans IDE.
This tutorial teaches you how to create a simple graphical user
interface and add simple back-end functionality. It shows you
how to code the behavior of buttons and fields in a Swing form.
First will be about working through the layout and design of a
GUI and add few buttons and text fields. The text fields will be
used for receiving user input and also for displaying the program
output. The button will initiate the functionality built into the
front end. With the tutorial, you will be able to create a simple but
functional calculator application.

To complete this tutorial, you need to have NetBeans IDE with


Java SE version 6.9 or higher, and Java Development Kit (JDK)
version 6, 7, or 8.

The first step is to create an IDE project for the application that
you are going to develop. You will name your
project NumberAddition.
1. Choose File > New Project. Alternatively, you can click
the New Project icon in the IDE toolbar.
2. In the Categories pane, select the Java node. In the
Projects pane, choose Java Application. Click Next.
3. Type NumberAddition in the Project Name field and
specify a path, for example, in your home directory, as the
project location.
4. (Optional) Select the Use Dedicated Folder for Storing
Libraries checkbox and specify the location for the
libraries folder.
5. Deselect the Create Main Class checkbox if it is selected.
6. Click Finish.
To proceed in creating your interface, you need to create a Java
container within which you will place the other required GUI
components. In here, you will create a container using
the JFrame component. You will place the container in a new
package, which will appear within the Source Packages node.

Create a JFrame container


1. In the Projects window, right-click
Project WRITE XI:the NumberAddition node
An Easy Guide for Course Pack
andmaking and Module Development
choose New > Other.
2. In the New File dialog box, choose the Swing GUI
Forms category and the JFrame Form file type. Click
Next.
3. Enter NumberAdditionUI as the class name.
4. Enter my.numberaddition as the package.
5. Click Finish.
The IDE creates the NumberAdditionUI form and
the NumberAdditionUI class within
the NumberAddition application, and opens
the NumberAdditionUI form in the GUI Builder.
The my.NumberAddition package replaces the default package.

Add Components; Create the Front End


Next you will use the Palette to populate your application's front
end with a JPanel. Then you will add three JLabels, three
JTextFields, and three JButtons. Once you are done dragging and
positioning the aforementioned components, the JFrame should
look something like the following screenshot.

If you do not see the Palette window in the upper right corner of
the IDE, choose Window > Palette.
1. Start by selecting a Panel from the Swing Containers
category on Palette and drop it onto the JFrame.
2. While the JPanel is highlighted, go to the Properties
window and click the ellipsis (...) button next to Border to
choose a border style.
3. In the Border dialog, select TitledBorder from the list, and
type in Number Addition in the Title field. Click OK to
save the changes and exit the dialog.
4. XI:You
Project WRITE should
An Easy Guidenow see anPack
for Course empty titled
making andJFrame that says
Module Development
Number Addition like in the screenshot. Look at the
screenshot and add three JLabels, three JTextFields and
three JButtons as you see above.
Rename the Components
You are going to rename the display text of the components that
were just added to the JFrame.
1. Double-click jLabel1 and change the text property to First
Number:.
2. Double-click jLabel2 and change the text to Second
Number:.
3. Double-click jLabel3 and change the text to Result:.
4. Delete the sample text from jTextField1. You can make
the display text editable by right-clicking the text field and
choosing Edit Text from the popup menu. You may have
to resize the jTextField1 to its original size. Repeat this
step for jTextField2 and jTextField3.
5. Rename the display text of jButton1 to Clear. (You can
edit a button's text by right-clicking the button and
choosing Edit Text. Or you can click the button, pause,
and then click again.)
6. Rename the display text of jButton2 to Add.
7. Rename the display text of jButton3 to Exit.
Your Finished GUI should now look like the following
screenshot:

Continuing, you are going to give functionality to the Add, Clear,


and Exit buttons. The jTextField1 and jTextField2 boxes will be
used for user input and jTextField3 for program output - what you
are creating is a very simple calculator. Let's begin.
Project WRITE XI: An Easy Guide for Course Pack making and Module Development
Make the Exit Button Work
In order to give function to the buttons, you have to assign an
event handler to each to respond to events. In your case you want
to know when the button is pressed, either by mouse click or via
keyboard. So you will use ActionListener responding to
ActionEvent.
1. Right click the Exit button. From the pop-up menu choose
Events > Action > actionPerformed. Note that the menu
contains many more events you can respond to! When you
select the actionPerformed event, the IDE will
automatically add an ActionListener to the Exit button
and generate a handler method for handling the listener's
actionPerformed method.
2. The IDE will open up the Source Code window and scroll
to where you implement the action you want the button to
do when the button is pressed (either by mouse click or
via keyboard). Your Source Code window should contain
the following lines:
3. private void
jButton3ActionPerformed(java.awt.event.ActionEvent
evt) {
4. //TODO add your handling code here:
}
5. You are now going to add code for what you want the
Exit Button to do. Replace the TODO line
with System.exit(0);. Your finished Exit button code
should look like this:
6. private void
jButton3ActionPerformed(java.awt.event.ActionEvent
evt) {
7. System.exit(0);
}
Make the Clear Button Work
1. Click the Design tab at the top of your work area to go
back to the Form Design.
2. Right click the Clear button (jButton1). From the pop-up
menu select Events > Action > actionPerformed.
3. You are going to have the Clear button erase all text from
the jTextFields. To do this, you will add some code like
above. Your finished source code should look like this:
4. private void
jButton1ActionPerformed(java.awt.event.ActionEvent
Project WRITE XI:evt){
An Easy Guide for Course Pack making and Module Development
5. jTextField1.setText("");
6. jTextField2.setText("");
7. jTextField3.setText("");
}
The above code changes the text in all three of your JTextFields
to nothing, in essence it is overwriting the existing Text with a
blank.

Make the Add Button Work


The Add button will perform three actions.
1. It is going to accept user input
from jTextField1 and jTextField2 and convert the input
from a type String to a float.
2. It will then perform addition of the two numbers.
3. And finally, it will convert the sum to a type String and
place it in jTextField3.
To start off,
1. Click the Design tab at the top of your work area to go
back to the Form Design.
2. Right-click the Add button (jButton2). From the pop-up
menu, select Events > Action > actionPerformed.
3. You are going to add some code to have your Add button
work. The finished source code shall look like this:
4. private void
jButton2ActionPerformed(java.awt.event.ActionEvent
evt){
5. // First you define float variables.
6. float num1, num2, result;
7. // You have to parse the text to a type float.
8. num1 = Float.parseFloat(jTextField1.getText());
9. num2 = Float.parseFloat(jTextField2.getText());
10. // Now you can perform the addition.
11. result = num1+num2;
12. // You will now pass the value of result to jTextField3.
13. // At the same time, you are going to
14. // change the value of result from a float to a string.
15. jTextField3.setText(String.valueOf(result));
}
Our program is now complete you can now build and run it to see
it in action.

To run the program in the IDE:


1. XI:Choose
Project WRITE Run for>Course
An Easy Guide Run Pack
Project (Number
making and Module Addition)
Development
(alternatively, press F6).
Note: If you get a window informing you that Project
NumberAddition does not have a main class set, then you
should select my.NumberAddition.NumberAdditionUI as
the main class in the same window and click the OK
button.
To run the program outside of the IDE:
1. Choose Run > Clean and Build Main Project (Shift-F11)
to build the application JAR file.
2. Using your system's file explorer or file manager,
navigate to the NumberAddition/dist directory.
Note: The location of the NumberAddition project
directory depends on the path you specified while creating
the project.
3. Double-click the NumberAddition.jar file.
After a few seconds, the application should start.
You can also launch the application from the command line.
To launch the application from the command line:
1. On your system, open up a command prompt or terminal
window.
2. In the command prompt, change directories to
the NumberAddition/dist directory.
3. At the command line, type the following statement:
java -jar NumberAddition.jar
Note: Make
sure my.NumberAddition.NumberAdditionUI is set as the
main class before running the application. You can check
this by right-clicking the NumberAddition project node in
the Projects pane, choosing Properties in the popup menu,
and selecting the Run category in the Project Properties
dialog box. The Main Class field should
display my.numberaddition.NumberAdditionUI.

This tutorial has showed how to respond to a simple button event.


There are many more events you can have your application
respond to. The IDE can help you find the list of available events
your GUI components can handle:
1. Go back to the file NumberAdditionUI.java in the Editor.
Click the Design tab to see the GUI's layout in the GUI
Builder.
2. Right-click any GUI component, and select Events from
the pop-up menu. For now, just browse the menu to see
Project WRITE XI:what's
An Easy Guide
there, fordon't
you Course Packtomaking
need and Module Development
select anything.
3. Alternatively, you can select Properties from the Window
menu. In the Properties window, click the Events tab. In
the Events tab, you can view and edit events handlers
associated with the currently active GUI component.
4. You can have your application respond to key presses,
single, double and triple mouse clicks, mouse motion,
window size and focus changes. You can generate event
handlers for all of them from the Events menu. The most
common event you will use is an Action event.
This part of the tutorial is about how event handling work. Every
time you select an event from the Event menu, the IDE
automatically creates a so-called event listener for you, and hooks
it up to your component. Go through the following steps to see
how event handling works.
1. Go back to the file NumberAdditionUI.java in the Editor.
Click the Source tab to see the GUI's source.
2. Scroll down and note the
methods jButton1ActionPerformed(), jButton2ActionPerf
ormed(), and jButton3ActionPerformed() that you just
implemented. These methods are called event handlers.
3. Now scroll to a method called initComponents(). If you
do not see this method, look for a line that says Generated
Code; click the + sign next to it to expand the
collapsed initComponents() method.
4. First, note the blue block around
the initComponents() method. This code was auto-
generated by the IDE and you cannot edit it.
5. Now, browse through the initComponents() method.
Among other things, it contains the code that initializes
and places your GUI components on the form. This code
is generated and updated automatically while you place
and edit components in the Design view.
6. In initComponents(), scroll down to where it reads
7. jButton3.setText("Exit");
8. jButton3.addActionListener(new
java.awt.event.ActionListener() {
9. public void
actionPerformed(java.awt.event.ActionEvent evt) {
10. jButton3ActionPerformed(evt);
11. }
Project WRITE XI: An Easy});
Guide for Course Pack making and Module Development
This is the spot where an event listener object is added to
the GUI component; in this case, you register an
ActionListener to the jButton3. The ActionListener
interface has an actionPerformed method taking
ActionEvent object which is implemented simply by
calling your jButton3ActionPerformed event handler. The
button is now listening to action events. Everytime it is
pressed an ActionEvent is generated and passed to the
listener's actionPerformed method which in turn executes
code that you provided in the event handler for this event.

Usually, to be able to respond, each interactive GUI component


needs to register to an event listener and needs to implement an
event handler. As you can see, NetBeans IDE handles hooking up
the event listener for you, so you can concentrate on
implementing the actual business logic that should be triggered
by the event.

How to create project, package, and class using Netbeans?

To create project, package, and class using Netbeans, kindly


follow the steps below:

1. Create a new Java Application. Be sure to uncheck Create


main class.

2. Right-click on the Source Packages folder and select New


-> Java Package. Enter your webmail user name for the
name of the project.

Project WRITE XI: An Easy Guide for Course Pack making and Module Development
3. Right-click the user name package and select New -> Java
Main Class...

4. Name your class Menu.

Project WRITE XI: An Easy Guide for Course Pack making and Module Development

5. Run the project. You will be prompted to select the main


class. There will only be one choice: select it.

Application With the lesson you learned from the abstraction phase, you can
now apply it by creating your own application. To start off, use
the activity code with similar comments to that of the Java Swing
program template then change by adding and removing parts of it
as presented in the later tutorial to create a program that will let
the user input more than just numbers then display its intended
output serving as generated report depending on what use you can
think of it.

Closure Congratulations! You have successfully completed this lesson!


We hope that this lesson fulfilled your expectations and that you
are now able to:

ILO23. Design user interface.

You now have the knowledge and skill that you can confidently
use to use the specific IDE tool to design graphical user interface
for whatever application is needed to be programmed. The end of
this lesson should be the start or continuation to your journey into
Module 5: File Handling and Database Connectivity.

The following are the references used in this lesson:

About the JFC and Swing. (n.d.). Retrieved July 20, 2020, from
https://docs.oracle.com/javase/tutorial/uiswing/start/about.h
tml

Compiling and Running Swing Programs. (n.d.). Retrieved July


20, 2020, from
https://docs.oracle.com/javase/tutorial/uiswing/start/compil
e.html
Project WRITE XI: An Easy Guide for Course Pack making and Module Development

Creating a NetBeans Project for Assignments. (n.d.). Retrieved


August 14, 2020, from
https://users.cs.fiu.edu/~downeyt/cop2250/create_assign_pr
oj.html

Java Programming Tutorial. (n.d.). Retrieved July 20, 2020, from


https://www.ntu.edu.sg/home/ehchua/programming/java/J4
a_GUI.html

Java Swing Tutorial: Examples to create GUI. (n.d.). Retrieved


July 20, 2020, from https://www.guru99.com/java-swing-
gui.html

Leahy, P. (n.d.). How to Create a GUI Your Application Users


Will Love. Retrieved July 20, 2020, from
https://www.thoughtco.com/gui-2034108

NetBeans For Java. (n.d.). Retrieved August 07, 2020, from


https://www.ntu.edu.sg/home/ehchua/programming/howto/
NetBeans_HowTo.html

NetBeans IDE Features. (n.d.). Retrieved August 13, 2020, from


https://netbeans.org/features/ide/index.html

Saleem Gul, T. (n.d.). Introduction to GUI Building. Retrieved


August 11, 2020, from
https://netbeans.org/kb/docs/java/gui-functionality.html

Welcome to the NetBeans Community. (n.d.). Retrieved August


13, 2020, from https://netbeans.org/about/

What Is an IDE? (n.d.). Retrieved August 07, 2020, from


https://www.codecademy.com/articles/what-is-an-ide

MODULE ASSESSMENT
Using the lessons learned in the development of package, application programming interface,
and graphical user interface, create a program that will allow the user to graphically input the
user’s profile and be displayed in a table view.

MODULE SUMMARY
This module teaches theWRITE
Project development
XI: An Easyof package,
Guide application
for Course programming
Pack making interface, and
and Module Development
graphical user interface.
//Package

//API

The GUI needs the appropriate API such as the Java Swing to provide graphical user interface
without making it from scratch. GUI helps the user to navigate the program more effectively and
more conveniently. IDEs increases programmer productivity by combining common activities of
writing software into a single application including the editing of source code, syntax
highlighting, autocomplete, building executables, and debugging. The most common IDE being
used in Java programming is the NetBeans. NetBeans is open-source.

Project WRITE XI: An Easy Guide for Course Pack making and Module Development

You might also like