public void actionPerformed(ActionEvent e) {
		remove(H);
		if (e.getActionCommand().equals("Reset")) {
			if (!removed) {
				I = (X - (Y / 2));
				J = (Y / 2);
			} else {
				I = (X / 2);
				J = (Y / 2);
			}
			R.xs.setText("1.0");
			R.ys.setText("1.0");
			x_scale = 1.0;
			y_scale = 1.0;
		} else if (e.getActionCommand().equals("Help")) {
			add(H);
		} else if (e.getActionCommand().equals("Panels")) {
			if (!removed) {

				remove(p);
				remove(R);
				remove(PP);
				removed = true;
				LEFTLIMIT = 0;
				I = (X / 2);
				J = (Y / 2);
			} else {
				add(p);
				add(R);
				add(PP);
				LEFTLIMIT = X - Y;
				removed = false;
				I = (X - (Y / 2));
				J = (Y / 2) + 1;
			}
			repaint();
		} else {
			func = p.function.getText();
			String m = null, n = null;
			m = R.xs.getText();
			n = R.ys.getText();
			if (m.equals(""))
				m = "1.0";
			if (n.equals(""))
				n = "1.0";
			x_scale = Double.parseDouble(m);
			y_scale = Double.parseDouble(n);
			if (x_scale <= 0.0)
				x_scale = 1.0;
			if (y_scale <= 0.0)
				y_scale = 1.0;
		}
		repaint();
	}