The third text frame behaves weird
public static void main(String[] args) {
String name = JOptionPane.showInputDialog("Enter Your Name");
JOptionPane.showMessageDialog(null,"Hello "+name);
int age = Integer.parseInt(JOptionPane.showInputDialog("Enter Your Age"));
JOptionPane.showMessageDialog(null,"You are "+age+" years old");
double height = Double.parseDouble(JOptionPane.showInputDialog("Enter Your Height in cm"));
JOptionPane.showMessageDialog(null,"You are "+height+" cm tall");
String heightstr = ""+height;
String agestr = ""+age;
double born = 2023-age;
String bornstr = " "+ born;
Font font = new Font("Franklin Gothic",Font.BOLD,30);
JFrame f = new JFrame();
f.setBounds(600,500,400,400);
JTextField tfn = new JTextField("name");
tfn.setEditable(false);
tfn.setText(name);
tfn.setHorizontalAlignment(SwingConstants.LEFT);
tfn.setBorder(javax.swing.BorderFactory.createEtchedBorder());
tfn.setFocusable(false);
tfn.setFont(font);
tfn.setBounds(10,50,300,50);
JTextField tfa = new JTextField("age");
tfa.setEditable(false);
tfa.setText(agestr);
tfa.setHorizontalAlignment(SwingConstants.LEFT);
tfa.setBorder(javax.swing.BorderFactory.createEtchedBorder());
tfa.setFocusable(false);
tfa.setFont(font);
tfa.setBounds(10,125,300,50);
JTextField tfh = new JTextField("height");
tfh.setEditable(false);
tfh.setText(heightstr);
tfh.setHorizontalAlignment(SwingConstants.LEFT);
tfh.setBorder(javax.swing.BorderFactory.createEtchedBorder());
tfh.setFont(font);
tfh.setFocusable(false);
tfh.setBounds(10,200,300,50);
f.add(tfn);
f.add(tfa);
f.add(tfh);
f.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
f.setVisible(true);
}
}```