	public void actionPerformed(ActionEvent e) {
		if(e.getSource() == nameSort)
		{
			String temp;
			for(int i = 0; i < lists.size(); i++)
			{
				for(int j = 1; j < lists.size()-i; j++)
				{
					if(lists.get(j-1).getText().compareTo(lists.get(j).getText()) > 0)
					{
						temp = lists.get(j-1).getText();
						lists.get(j-1).setText(lists.get(j).getText());
						lists.get(j).setText(temp);
						temp = amounts.get(j-1).getText();
						amounts.get(j-1).setText(amounts.get(j).getText());
						amounts.get(j).setText(temp);
						temp = dates.get(j-1).getText();
						dates.get(j-1).setText(dates.get(j).getText());
						dates.get(j).setText(temp);
					}
				}
			}
			repaint();
		}
		if(e.getSource() == dateSort)
		{
			String temp;
			for(int i = 0; i < lists.size(); i++)
			{
				for(int j = 1; j < lists.size()-i; j++)
				{
					String first = dates.get(j-1).getText();
					String second = dates.get(j).getText();
					if(first.substring(first.length()-4).compareTo(second.substring(second.length()-4)) > 0)
					{
						Integer monthOne = new Integer(first.substring(0, first.indexOf('/')));
						Integer monthTwo = new Integer(second.substring(0, second.indexOf('/')));
						if(monthOne.compareTo(monthTwo) > 0)
						{
							int diff = monthTwo.intValue() - monthOne.intValue();
							boolean doSwitch = false;
							Integer dayOne = new Integer(first.substring(first.indexOf('/')+1, first.indexOf('/', first.indexOf('/')+1)));
							Integer dayTwo = new Integer(second.substring(second.indexOf('/')+1, second.indexOf('/', second.indexOf('/')+1)));
							if(diff > 0)
								doSwitch = true;
							else if(dayOne < dayTwo)
								doSwitch = true;
							if(doSwitch)
							{
								temp = lists.get(j-1).getText();
								lists.get(j-1).setText(lists.get(j).getText());
								lists.get(j).setText(temp);
								temp = amounts.get(j-1).getText();
								amounts.get(j-1).setText(amounts.get(j).getText());
								amounts.get(j).setText(temp);
								temp = dates.get(j-1).getText();
								dates.get(j-1).setText(dates.get(j).getText());
								dates.get(j).setText(temp);
							}
						}
					}
				}
			}
			repaint();
		}
		if(e.getSource() == amountSort)
		{
			String temp;
			for(int i = 0; i < lists.size(); i++)
			{
				for(int j = 1; j < lists.size()-i; j++)
				{
					Double d1 = new Double(amounts.get(j-1).getText().substring(1));
					Double d2 = new Double(amounts.get(j).getText().substring(1));
					if(d1.doubleValue() > d2.doubleValue())
					{
						temp = lists.get(j-1).getText();
						lists.get(j-1).setText(lists.get(j).getText());
						lists.get(j).setText(temp);
						temp = amounts.get(j-1).getText();
						amounts.get(j-1).setText(amounts.get(j).getText());
						amounts.get(j).setText(temp);
						temp = dates.get(j-1).getText();
						dates.get(j-1).setText(dates.get(j).getText());
						dates.get(j).setText(temp);
					}
				}
			}
			repaint();
		}
	}

	public void actionPerformed(ActionEvent e) {
		if(e.getSource() == nameSort)
		{
			String temp;
			for(int i = 0; i < lists.size(); i++)
			{
				for(int j = 1; j < lists.size()-i; j++)
				{
					if(lists.get(j-1).getText().compareTo(lists.get(j).getText()) > 0)
					{
						temp = lists.get(j-1).getText();
						lists.get(j-1).setText(lists.get(j).getText());
						lists.get(j).setText(temp);
						temp = amounts.get(j-1).getText();
						amounts.get(j-1).setText(amounts.get(j).getText());
						amounts.get(j).setText(temp);
						temp = dates.get(j-1).getText();
						dates.get(j-1).setText(dates.get(j).getText());
						dates.get(j).setText(temp);
					}
				}
			}
			repaint();
		}
		if(e.getSource() == dateSort)
		{
			String temp;
			for(int i = 0; i < lists.size(); i++)
			{
				for(int j = 1; j < lists.size()-i; j++)
				{
					String first = dates.get(j-1).getText();
					String second = dates.get(j).getText();
					if(first.substring(first.length()-4).compareTo(second.substring(second.length()-4)) >= 0)
					{
						Integer monthOne = new Integer(first.substring(0, first.indexOf('/')));
						Integer monthTwo = new Integer(second.substring(0, second.indexOf('/')));
						if(monthOne.compareTo(monthTwo) >= 0)
						{
							int diff = monthTwo.intValue() - monthOne.intValue();
							boolean doSwitch = false;
							Integer dayOne = new Integer(first.substring(first.indexOf('/')+1, first.indexOf('/', first.indexOf('/')+1)));
							Integer dayTwo = new Integer(second.substring(second.indexOf('/')+1, second.indexOf('/', second.indexOf('/')+1)));
							if(diff > 0)
								doSwitch = true;
							else if(dayOne < dayTwo)
								doSwitch = true;
							if(doSwitch)
							{
								temp = lists.get(j-1).getText();
								lists.get(j-1).setText(lists.get(j).getText());
								lists.get(j).setText(temp);
								temp = amounts.get(j-1).getText();
								amounts.get(j-1).setText(amounts.get(j).getText());
								amounts.get(j).setText(temp);
								temp = dates.get(j-1).getText();
								dates.get(j-1).setText(dates.get(j).getText());
								dates.get(j).setText(temp);
							}
						}
					}
				}
			}
			repaint();
		}
		if(e.getSource() == amountSort)
		{
			String temp;
			for(int i = 0; i < lists.size(); i++)
			{
				for(int j = 1; j < lists.size()-i; j++)
				{
					Double d1 = new Double(amounts.get(j-1).getText().substring(1));
					Double d2 = new Double(amounts.get(j).getText().substring(1));
					if(d1.doubleValue() > d2.doubleValue())
					{
						temp = lists.get(j-1).getText();
						lists.get(j-1).setText(lists.get(j).getText());
						lists.get(j).setText(temp);
						temp = amounts.get(j-1).getText();
						amounts.get(j-1).setText(amounts.get(j).getText());
						amounts.get(j).setText(temp);
						temp = dates.get(j-1).getText();
						dates.get(j-1).setText(dates.get(j).getText());
						dates.get(j).setText(temp);
					}
				}
			}
			repaint();
		}
	}
