private void changeEndDateAndAmount(){
        System.out.println("there");
        Membership membership= new Membership();
        if(jComboBox1.getSelectedObjects()!=null)
        membership = (Membership)jComboBox1.getSelectedObjects()[0];
        
     
        boolean validStartDate= false;
      int year=0,month=0,day=0;
        try{ 
       year = Integer.parseInt(jTextField1.getText());
       month = Integer.parseInt(jTextField2.getText());
       day = Integer.parseInt(jTextField3.getText());
      }
      catch(NumberFormatException n){
          ;
      }
       if(year>1980&&year<2100&&day>0&&day<32&&month>0&&month<13)
           validStartDate=true;
       
      if(validStartDate){
      
        
      Calendar start =  Calendar.getInstance();
      start.set(year,month-1,day);
      System.out.println("start "+start.getTime());
      start.add(Calendar.YEAR,membership.getYears());
      start.add(Calendar.DATE,membership.getDays());
      start.add(Calendar.MONTH,membership.getMonths());
      
     
      System.out.println("end "+start.getTime());
      jTextField4.setText((start.getTime().getYear()+1900)+"");
      jTextField5.setText(start.getTime().getMonth()+1+"");
      jTextField6.setText(start.getTime().getDate()+"");
      jTextField7.setText(membership.getAmount()+"");
        //Date end = start.
      }
      System.out.println(year+" "+" "+month +" "+ day+" ");
      System.out.println(membership.getYears()+" "+" "+membership.getMonths() +" "+ membership.getDays()+" ");
    }