correct the error?
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JLabel;
import javax.swing.JTextField;
import javax.swing.JButton;
import java.awt.*;
import javax.swing.*;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import java.io.FileWriter;
import java.io.IOException;
import java.io.File;
import java.util.Scanner;
public class Form implements ActionListener{
private static JLabel userLabel;
private static JTextField userText;
private static JLabel PasswordLabel;
private static JPasswordField passwordLabel;
private static JButton button;
private static JLabel success;
public static void main(String[] args){
JPanel panel=new JPanel();
JFrame frame=new JFrame();
frame.setSize(350,200);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setVisible(true);
frame.add(panel);
panel.setLayout(null);
userLabel=new JLabel("UserName");
userLabel.setBounds(10,20,80,25);
panel.add(userLabel);
userText=new JTextField(20);
userText.setBounds(100,20,165,25);
panel.add(userText);
PasswordLabel=new JLabel("Password");
PasswordLabel.setBounds(10,50,80,25);
panel.add(PasswordLabel);
passwordLabel=new JPasswordField(20);
passwordLabel.setBounds(100,20,165,25);
panel.add(passwordLabel);
button=new JButton("Login");
button.setBounds(10,80,80,25);
button.addActionListener(new Login());
panel.add(button);
success=new JLabel(" ");
success.setBounds(10,110,300,25);
panel.add(success);
frame.setVisible(true);
}
public void actionPerformed(ActionEvent e){
String user=userText.getText();
String password=passwordText.getText();
System.out.printin(user+" , "+password);
if(user.equals("alex")&& password.equals("aleeexx")){
success.setText("Login successful!");
}
}
}
}
}
public class Form implements ActionListener{
private static JLabel nameLabel;
private static JTextField nameText;
private static JLabel ageLabel;
private static JTextField ageText;
private static JLabel occupationLabel;
private static JTextField occupationText;
private static JLabel salaryLabel;
private static JTextField salaryText;
private static JButton submitButton;
private static JLabel successLabel;
public static void main(String[] args){
JPanel panel=new JPanel();
JFrame frame=new JFrame();
frame.setSize(400,300);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setVisible(true);
frame.add(panel);
panel.setLayout(null);
nameLabel=new JLabel("Name:");
nameLabel.setBounds(10,20,80,25);
panel.add(nameLabel);
nameText=new JTextField(20);
nameText.setBounds(100,20,165,25);
panel.add(nameText);
ageLabel=new JLabel("Age:");
ageLabel.setBounds(10,50,80,25);
panel.add(ageLabel);
ageText=new JTextField(20);
ageText.setBounds(100,50,165,25);
panel.add(ageText);
occupationLabel=new JLabel("Occupation:");
occupationLabel.setBounds(10,80,80,25);
panel.add(occupationLabel);
occupationText=new JTextField(20);
occupationText.setBounds(100,80,165,25);
panel.add(occupationText);
salaryLabel=new JLabel("Salary:");
salaryLabel.setBounds(10,110,80,.Read less