public void actionPerformed(ActionEvent e)
       {
          if(e.getActionCommand()=="Show")
            {
		try{
                  Integer.parseInt(t1.getText());
                  }
                  catch(NumberFormatException ex)
                  {
                          JOptionPane.showMessageDialog(null,"Invalid ID");
                   }

             /* if(t1.getText()=="")
                {
                  JOptionPane.showMessageDialog(null,"Please enter ID !");
                 }*/
            
              //else
              // {
                 Student s;
                 s=data.get(Integer.parseInt(t1.getText()));
                // System.out.println(s);
                 t1.setText(Integer.toString(s.getID()));
                 t2.setText(s.getName());
                 t3.setText(s.getDOB());
                 t4.setText(Double.toString(s.getCPI()));
               // }
       
             }

          if(e.getActionCommand()=="Delete")
            {
              try{
                 Integer.parseInt(t1.getText());
                 }
                 catch(NumberFormatException ex)
                 {
                         JOptionPane.showMessageDialog(null,"Invalid ID");
                 }

             
                 data.remove(Integer.parseInt(t1.getText()));
                
             }

          if(e.getActionCommand()=="Save")
            {

		try{	
		Integer.parseInt(t1.getText());
		}
		catch(NumberFormatException ex)
		{
			JOptionPane.showMessageDialog(null,"Invalid ID");
		}
              
                  Student s1=new Student(Integer.parseInt(t1.getText()),t2.getText(),t3.getText(),Double.parseDouble(t4.getText()));   
		   data.put(Integer.parseInt(t1.getText()),s1);
                   t1.setText(null);
                   t2.setText(null);
                   t3.setText(null);
                   t4.setText(null);
                 }
             
        }