title: GUI showing but not functional
body: <p>I have to write some Java code to create GUI and the idea is this. The user will input two numbers and then he will choose one of the radiobuttons. If he chooses "zgjidh", he should click a button that will do the calculations depending on what kind of calculation the button is for. "Fshij"button is kinda like reset to clear all field. If he chooses "dil" the window will close. For some reason it doesn't seem to work. Can someone help me?</p>
  
  <pre><code>   import java.awt.*;
     import java.awt.event.ActionListener;
     import java.awt.event.ItemEvent;
     import javax.swing.*;
     import java.awt.event.ActionEvent;
  
  public class Gui extends JFrame implements ActionListener{
    JButton plus,minus,fshi;
    JTextField vn1,vn2,vrez;
    JLabel n1,n2,rezultati;
    JRadioButton zgjidh,dil;
    ButtonGroup grupi;
  
    public Gui(){
      setLayout(new FlowLayout());
      JPanel veri=new JPanel();
      veri.setLayout(new GridLayout(3,2));
  
      n1=new JLabel("Jep numrin e 1");
      veri.add(n1);
  
      vn1=new JTextField(10);
      veri.add(vn1);
  
      n2=new JLabel("Jep numrin e 2");
      veri.add(n2);
  
      vn2=new JTextField(10);
      veri.add(vn2);
  
      rezultati=new JLabel("Rezultati");
      veri.add(rezultati);
  
      vrez=new JTextField(10);
      veri.add(vrez);
  
      add(veri,BorderLayout.NORTH);
  
      JPanel qender=new JPanel();
      qender.setLayout(new GridLayout(2,1));
  
      zgjidh=new JRadioButton("Zgidh Veprimin");
      zgjidh.addActionListener(this);
      dil=new JRadioButton("Dil");
      dil.addActionListener(this);
      grupi=new ButtonGroup();
  
      grupi.add(zgjidh);
      grupi.add(dil);
  
      qender.add(zgjidh);
      qender.add(dil);
  
      add(qender,BorderLayout.CENTER);
  
      JPanel jug=new JPanel();
      jug.setLayout(new GridLayout(1,3));
      plus=new JButton("+");
      plus.addActionListener(this);
      jug.add(plus);
  
      minus=new JButton("-");
      minus.addActionListener(this);
      jug.add(minus);
  
      fshi=new JButton("Fshij");
      fshi.addActionListener(this);
      jug.add(fshi);
  
      add(jug,BorderLayout.SOUTH);
  
    }
    public void actionPerformed (ActionEvent e){ 
      double n1=Double.parseDouble(vn1.getText());
      double n2=Double.parseDouble(vn2.getText());
      if (e.getSource()==zgjidh) {
          if (e.getSource()==plus) {
              vrez.setText(""+(n1+n2));
          }
          else if (e.getSource()==minus) {
              vrez.setText(""+(n1-n2));
          }
          else if (e.getSource()==fshi) {
              vn1.setText("");
              vn2.setText("");
              vrez.setText("");
          }
      }
      else if(e.getSource()==dil) {
          System.exit(0);
      }
    }
  
    public static void main(String args[]) {
      Gui ob=new Gui();
      ob.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
      ob.setSize(500,500);
      ob.setVisible(true);
    }
  }
  </code></pre>