Coders Packet

Online result portal in Java using Java Swing


This is a java project that evaluates the performance of the students or staff by generating a progress report.

It consists of a "Login Portal" and an "Online Result Portal" to display the results.

The features of this project are,

1.Provides security because users can access only by entering the username and password.

2.There is a provision of the subject, grade, and credit column separately which makes it easier to access.

3.The accuracy of the project is 99.99%, thus making it trustworthy.


Java NETBEANS With JDK(latest version)

This project is done in Java using Java Swing concept.

Coming to the packages,

The packages included here are java.awt.Toolkit, java.awt.event.WindowEvent.


1.Create a new java application by clicking File-->New project and set a suitable name for the project.

2.Create a Swing GUI form by clicking New File-> Swing GUI Forms -> JFrame Form. This will be redirected to a window that has three major parts:

a) Design: This is the window where we will design the application for our project.

b) Palette: For designing the window, the palette provides various widgets. Here we use, Panel, Label, TextField, PasswordField, and Buttons.

I have created a "Login Portal" and an "Online Result Portal" for two users.

The design of the Login portal is shown below.


c) Source: This is where we execute and run the source code.

3. Edit the code properties by renaming the VariabeName. Here, we have renamed the Textfield as jtxtUserName, Passwordfield as jpassword, Login Button as jbtnLogin, Reset Button as jbtnReset, and Exit Button as jbtnExit.

4. To execute the Exit Button we use,

 public void systemExit()


    WindowEvent WinCloseing = new WindowEvent(this,WindowEvent.WINDOW_CLOSING);


To execute the Reset Button we use,



To execute the Login Button,

Set the username and password using an if-else ladder.

Here I have considered two users to be "Rose" with password "123" and "Lily" with password "456".

If neither of these is entered, the Online Result Portal displays an "Invalid syntax".

5. Compile and run the source code to get the desired output.


Output 1: Entered the Username: Rose and Password:123

Output 1

After logging in, it displays the "Online Result Portal" of Rose.


Output 2: Similarly, Entered the Username: Lily and Password:456

Output 2

After logging in, it displays the "Online Result Portal" of Lily.


Output 3: Entered an invalid Username: King and Password:1234567

Output 3

Output 4: The Login portal will reset by clicking the Reset button.

Output 5: The Login portal will exit by clicking the Exit button.


Download Complete Code


No comments yet