import javax.swing.JOptionPane;

public class InputJOptionPane {

    public static void main(String[] args) {
        // Prompt user to enter their name
        String name = JOptionPane.showInputDialog("Enter your name:");

        // Prompt user to enter their course
        String course = JOptionPane.showInputDialog("Enter your course:");

        // Prompt user to enter their year and section
        String yearAndSection = JOptionPane.showInputDialog("Enter your year and section:");

        // Prompt user to enter the subject and instructor
        String subjectAndInstructor = JOptionPane.showInputDialog("Enter the subject and instructor:");

        // Construct the output message
        String outputMessage = "Name: " + name + "\n"
                             + "Course: " + course + "\n"
                             + "Year and Section: " + yearAndSection + "\n"
                             + "Subject and Instructor: " + subjectAndInstructor;

        // Display the output message in a message dialog
        JOptionPane.showMessageDialog(null, outputMessage);
    }
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: