title: JButton is not vissible on my frame though i did not get kind of error on my terminal
body: <p>I tried make a java application which simply add two numbers and display the sum on my frame when button is clicked.
  Can anyone help me? ,to get rid out of it.
  I simply implement frame by extending JFrame class and do the coding in my class default constructor.
  Here is my code</p>
  <pre><code>import javax.swing.JButton;
  import javax.swing.JFrame;
  import javax.swing.JLabel;
  import javax.swing.JTextField;
  import java.awt.event.*;
  public class mySwing extends JFrame {
      JTextField t1;
      JTextField t2;
      mySwing(){
          JLabel l1 = new JLabel(&quot;Enter 1st No.&quot;);
          l1.setBounds(100, 50, 100, 30);
          JLabel l2 = new JLabel(&quot;Enter 2nd No.&quot;);
          l2.setBounds(100, 100,100, 30);
          JTextField t1 = new JTextField();
          t1.setBounds(300, 50,100, 30);
          JTextField t2 = new JTextField();
          t2.setBounds(300, 100,100, 30);
          JButton b1 = new JButton(&quot;Click&quot;);
          b1.setBounds(250, 200, 50, 50);
          b1.addActionListener(new myAction());
          add(l1);
          add(l2);
          add(t1);
          add(t2);
          add(b1);
          setVisible(true);
          setSize(600,600);
          setLayout(null);
          setDefaultCloseOperation(EXIT_ON_CLOSE);
      }
      class myAction implements ActionListener{
              public void actionPerformed(ActionEvent e){
                  int a = Integer.parseInt(t1.getText());
                  int b = Integer.parseInt(t2.getText());
                  int sum=a+b;
                  JLabel l3 = new JLabel(&quot;Result is &quot; +sum);
                  l3.setBounds(100, 300,100, 30);
                  add(l3);
              }
      }
      public static void main(String[] args) {
          mySwing s = new mySwing(); 
      }
  }
  
  enter code here
  </code></pre>