Second button (b2) is not visible on the JFrame.
All the 3 componenets l1,l2 and b2 are visible on JFrame but JButton b2 isn't.
public void Joptionpane(int a)
{
l1=new JLabel("Your score is :" + a);
l2=new JLabel("Do you want to continue ?");
b1= new JButton("Yes");
b2= new JButton("NO");
add(l1);
add(l2);
add(b1);
add(b2);
l1.setBounds(150,10,400,50);
l2.setBounds(150,60,400,50);
b1.setBounds(200,130,100,50);
b2.setBounds(300,130,100,50);
I have set the Layout to null
setVisible(true);
setLayout(null);
setTitle("Flappy Bird");
setSize(700,300);
setVisible(true);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);