0% found this document useful (0 votes)
7 views1 page

Welcome Form

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

Welcome Form

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

package loginformwithswingandjdbc;

import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.SwingConstants;

public class WelcomeForm {


JFrame frame;
public WelcomeForm()
{
JOptionPane.showMessageDialog(frame, "Login Successful! Welcome!");

// Code to open a new Welcome form


JFrame welcomeFrame = new JFrame("Welcome Form");
welcomeFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
welcomeFrame.setSize(300, 100);
welcomeFrame.setLocationRelativeTo(null);

JLabel welcomeLabel = new JLabel("Welcome to the application!");


welcomeLabel.setHorizontalAlignment(SwingConstants.CENTER);
welcomeFrame.add(welcomeLabel);

welcomeFrame.setVisible(true);
}
}

You might also like