private void updateRankCap(String Rank, String RankCap, JComboBox rankcapComboBox) {
		
		oldRankCap = RankCap;
		rankcapComboBox.setActionCommand("other");
		rankcapComboBox.removeItem("12");
		rankcapComboBox.removeItem("11");
		rankcapComboBox.removeItem("10");
		rankcapComboBox.removeItem("9");
		rankcapComboBox.removeItem("6");
		rankcapComboBox.removeItem("3");
		rankcapComboBox.setEnabled(true);
		rankcapComboBox.setActionCommand("RankCap");
		
		Vector<String> rankcapVector = new gen.Rank(Rank).getRankcapVector();
		for (int i=0; i <rankcapVector.size() ; i++)
		{
			rankcapComboBox.addItem(rankcapVector.elementAt(i));
		}
		
		int rankInt = Integer.parseInt(Rank);
		
		if (rankInt==11 || rankInt==12)
		{
			rankcapComboBox.setEnabled(false);
		}

		for(int i=0; i<rankcapComboBox.getItemCount();i++)
		{
			if (oldRankCap !=null && oldRankCap.compareTo((String) rankcapComboBox.getItemAt(i))==0)
			{
				rankcapComboBox.setSelectedItem(rankcapComboBox.getItemAt(i));
			}
			
		}
		
		//if old rank is less than 6 and new rank is greater than old rank and oldrankcap is 6 then 
		if(oldRankCap!=null && Integer.parseInt(Rank)>Integer.parseInt(oldRankCap))
		{
			rankcapComboBox.setSelectedItem(rankcapComboBox.getItemAt(rankcapComboBox.getItemCount()-1));
		}
		
	}