public ParticleSystemOptionDialog(String title) throws LWJGLException {
	super(title);

	GroupLayout groupLayout = new GroupLayout(getContentPane());
	getContentPane().setLayout(groupLayout);

	groupLayout.setAutoCreateGaps(true);
	groupLayout.setAutoCreateContainerGaps(true);

	DisplayMode[] displayModes = Display.getAvailableDisplayModes();
	for (int i = 2; i < displayModes.length; i++) {
	    for (int j = i; j >= 1; j--) {
		if (displayModes[j - 1].getWidth() > displayModes[j].getWidth())
		    break;
		if (displayModes[j - 1].getWidth() == displayModes[j]
			.getWidth()) {
		    if (displayModes[j - 1].getHeight() > displayModes[j]
			    .getHeight())
			break;
		    if (displayModes[j - 1].getHeight() == displayModes[j]
			    .getHeight()) {
			if (displayModes[j - 1].getBitsPerPixel() > displayModes[j]
				.getBitsPerPixel())
			    break;
			if (displayModes[j - 1].getBitsPerPixel() == displayModes[j]
				.getBitsPerPixel()) {
			    if (displayModes[j - 1].getFrequency() >= displayModes[j]
				    .getFrequency())
				break;
			}
		    }
		}

		DisplayMode tmp = displayModes[j];
		displayModes[j] = displayModes[j - 1];
		displayModes[j - 1] = tmp;
	    }
	}
	displayMode = new JComboBox<DisplayMode>(displayModes);

	SpinnerNumberModel particleCountModel = new SpinnerNumberModel(1000000,
		0, Integer.MAX_VALUE, 1000000);
	particleCount = new JSpinner(particleCountModel);

	calcRatio = new JCheckBox("Calc Ratio", true);
	fullscreen = new JCheckBox("Fullscreen");
	vSync = new JCheckBox("VSync", true);

	JButton start = new JButton("Start");
	start.addActionListener(new ActionListener() {
	    public void actionPerformed(ActionEvent e) {
		synchronized (waitObject) {
		    waitObject.notify();
		}
	    }
	});

	groupLayout.setHorizontalGroup(groupLayout.createParallelGroup()
		.addComponent(displayMode).addComponent(particleCount)
		.addComponent(calcRatio).addComponent(fullscreen)
		.addComponent(vSync)
		.addComponent(start, GroupLayout.Alignment.TRAILING));

	groupLayout.setVerticalGroup(groupLayout.createSequentialGroup()
		.addComponent(displayMode).addComponent(particleCount)
		.addComponent(calcRatio).addComponent(fullscreen)
		.addComponent(vSync).addComponent(start));

	pack();
	centerJFrame(this);
	setResizable(false);
	setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
	setVisible(true);
    }