Introduction

In this article, we deal with images using the GUI Builder to produce source code for including and displaying the image on our application. This article will introduce you to how the NetBeans IDE functions for including an image and how it works on an image.
Step 1:
Create the project using the following procedure:
17.1.jpg
Step 2:
Use the following procedure to create the JFrame Form:
17.2.jpg
Adding Jlabel to the Form
To add a Jlabel to the Form, from the palette window select "Label" and then drag it to the frame. The screenshot is as in the following:
17.3.jpg
Step 3:
Including a Package for Image
Normally when we want to use an image or any other file in an application we need to create a separate package for that resource.
The following is the procedure for creating a package:
17.4.jpg
17.5.jpg
Step 4:
The following is the procedure for showing the image on the Label:
17.6.jpg
17.7.jpg
The image appears on the JFrame.
17.8.jpg
Step 5:
Running the Application
Run the application as usual. The output snapshot is shown below:
17.9.jpg