static void show2(DataQueue q, Frame owner) {

		if (q.pointer <= 0) {
			JOptionPane.showMessageDialog(owner, "No data to plot. Collect some and come back.", "Empty Data Set",
					JOptionPane.ERROR_MESSAGE);
			return;
		}

		if (q instanceof ObjectQueue)
			throw new RuntimeException("An object queue is generally not plottable");
		if (q.coordinateQ == null)
			throw new RuntimeException("A coordinate queue is needed in order to plot the data stored in this queue");
		if (q.coordinateQ.getLength() != q.getLength())
			throw new MismatchException("The coodinate queue does not have the same length");
		if (q.coordinateQ.getInterval() != q.getInterval())
			throw new MismatchException("The coodinate queue does not have the same sampling interval: "
					+ q.getInterval() + "!=" + q.coordinateQ.getInterval());

		XYGrapher graph = new XYGrapher();
		CurveGroup cg = new CurveGroup(q.name, new AxisLabel("Time (fs)"), new AxisLabel(q.name));
		if (q.coordinateQ instanceof FloatQueue && q instanceof FloatQueue) {
			cg.addCurve(new Curve(q.coordinateQ, q, new CurveFlavor(), new Legend(q.name)));
		}
		graph.input(cg);

		JDialog dialog = new JDialog(owner, cg.getTitle(), true);
		graph.setDialog(dialog);
		dialog.getContentPane().add(graph, BorderLayout.CENTER);
		dialog.setSize(300, 300);
		dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
		dialog.pack();
		dialog.setLocationRelativeTo(owner);
		dialog.setVisible(true);

	}