when i am clicking the submit button nothing in happening i created a program to make a counter where we can add the time and when i am entering the time in seconds and clicking the submit button it is not working
import java.awt.event.*;
import java.awt.*;
import javax.swing.*;
import java.lang.*;
public class CountdownTimer extends Thread 
{
    JTextField tf,tf2;
    JLabel l1,l2;
    JFrame fr;
    JButton b;
    String n;
    int t;
    public void run()
    {
        buildGUI();
    }
    public void buildGUI()
    {
        fr = new JFrame("Countdown Timer");
        JPanel p = new JPanel();
        l2 = new JLabel("Please Enter the Time:");
        l1 = new JLabel("");
        tf2 = new JTextField(8);
        tf2.setEnabled(true);
        tf2.setBackground(Color.white);
        p.setBackground(Color.white);  
        JButton b=new JButton("Submit");  
        b.setEnabled(true);
        b.setVisible(true);
        fr.add(p);
        p.add(l2);
        p.add(tf2);
        p.add(b);
        fr.setVisible(true);
        fr.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        fr.setSize(300,200);
        fr.setResizable(false);
        n = tf2.getText();
        fr.setSize(300,200);
        t = Integer.parseInt(n);
        b.addActionListener(new ActionListener()
        {
            public void actionPerformed(ActionEvent e)
            {
                tf = new JTextField(15);
                tf.setEnabled(false);
                b.setVisible(false);
                tf2.setVisible(false);
                l2.setVisible(false);
                Font f = new Font("Verdana", 0, 18);
                tf.setFont(f);
                tf.setBackground(Color.white);
                tf.setVisible(true);
                p.add(tf);
                for(int i = t;i>=0;i--)
                {
                    try
                    {
                          Thread.sleep(1000);
                          String s = Integer.toString(i);
                          tf.setText("        "+ s + " Seconds to go...");
                     }
                     catch(Exception e1)
                     {
                         System.out.println(e);
                     }
                }
                JOptionPane.showMessageDialog(fr,"Times up!!!");
                tf.setText("");
                tf.setEnabled(false);
            }
        });          
    }
    public static void main(String args[])
    {
        CountdownTimer obj = new CountdownTimer();
        obj.start();
    }
}
and when i am clicking the submit button i created i am getting an exception
Exception in thread "Thread-4" java.lang.NumberFormatException: For input string: ""
    at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
    at java.base/java.lang.Integer.parseInt(Integer.java:662)
    at java.base/java.lang.Integer.parseInt(Integer.java:770)
    at CountdownTimer.buildGUI(CountdownTimer.java:40)
    at CountdownTimer.run(CountdownTimer.java:15)
Exception in thread "Thread-0" java.lang.NumberFormatException: For input string: ""
    at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
    at java.base/java.lang.Integer.parseInt(Integer.java:662)
    at java.base/java.lang.Integer.parseInt(Integer.java:770
 
     
    