FileDocCategorySizeDatePackage
QViewTest.javaAPI DocExample1237Sun May 05 20:36:40 BST 2002None

QViewTest

public class QViewTest extends Object
Simple test case for QView

Fields Summary
Constructors Summary
Methods Summary
public static voidmain(java.lang.String[] a)

		JFrame f = new JFrame("QView Test");

		JTabbedPane cm = new JTabbedPane();
		f.setContentPane(cm);

		Q q = new Q(4);
		QView qv = new QView(q);
		cm.addTab("0", qv);
		q.setQText("To be or not to be, that is the question", true);
		q.setAnsText(0, "Hello world", true);
		q.setAnsText(1, "Goodbye cruel world", true);
		q.setAnsText(2, "Settle it with a bare bodkin, princikins", true);
		q.setAnsText(3, "42", true);
		q.setAns(2, false);

		q = new Q(4);
		q.setQText("Whether 'tis nobler in the mind to suffer the slings and arrows of outrageous fortune,", true);
		q.setAnsText(0, "Hello world", true);
		q.setAnsText(1, "Goodbye cruel world", true);
		q.setAnsText(2, "Settle it with a bare bodkin, princikins", true);
		q.setAnsText(3, "42", true);
		q.setAns(3, false);
		qv = new QView(q);
		cm.addTab("1", qv);

		f.setSize(600, 400);
		f.setLocation(100, 100);
		f.setVisible(true);
		f.addWindowListener(new WindowAdapter() {
			public void windowClosing(WindowEvent we) {
				System.exit(0);
			}
		});