public MinimizerDialog(MolecularModel m) {

		super(JOptionPane.getFrameForComponent(m.getView()), "Energy Minimizer", true);
		String s = MolecularContainer.getInternationalText("EnergyMinimizer");
		if (s != null)
			setTitle(s);
		setDefaultCloseOperation(DISPOSE_ON_CLOSE);

		model = m;

		JPanel panel = new JPanel(new BorderLayout());
		panel.setBorder(BorderFactory.createEtchedBorder());

		JPanel p = new JPanel();
		p.setLayout(new BoxLayout(p, BoxLayout.Y_AXIS));
		s = MolecularContainer.getInternationalText("ChooseMethod");
		p.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), s != null ? s
				: "Choose a method"));

		ButtonGroup bg = new ButtonGroup();

		s = MolecularContainer.getInternationalText("SteepestDescents");
		JRadioButton rb = new JRadioButton(s != null ? s : "Steepest Descents");
		rb.setSelected(true);
		bg.add(rb);
		p.add(rb);

		s = MolecularContainer.getInternationalText("ConjugateGradients");
		rb = new JRadioButton(s != null ? s : "Conjugate Gradients");
		rb.setEnabled(false);
		bg.add(rb);
		p.add(rb);

		panel.add(p, BorderLayout.WEST);

		p = new JPanel();
		p.setLayout(new BoxLayout(p, BoxLayout.Y_AXIS));
		s = MolecularContainer.getInternationalText("Parameter");
		p.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), s != null ? s : "Parameters"));

		Box box = new Box(BoxLayout.X_AXIS);
		s = MolecularContainer.getInternationalText("NumberOfSteps");
		box.add(new JLabel((s != null ? s : "Number of Steps") + ": ", SwingConstants.LEFT));
		JComboBox cb = new JComboBox(new Object[] { new Short((short) 100), new Short((short) 500),
				new Short((short) 1000), new Short((short) 5000), new Short((short) 10000) });
		cb.setPreferredSize(new Dimension(80, 20));
		cb.setSelectedIndex(0);
		cb.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				JComboBox c = (JComboBox) e.getSource();
				nstep = ((Short) c.getSelectedItem()).shortValue();
			}
		});
		box.add(cb);
		p.add(box);

		box = new Box(BoxLayout.X_AXIS);
		s = MolecularContainer.getInternationalText("Steplength");
		box.add(new JLabel((s != null ? s : "Steplength") + ": ", SwingConstants.LEFT));
		cb = new JComboBox(new Object[] { new Float(0.1f), new Float(0.2f), new Float(0.3f), new Float(0.4f),
				new Float(0.5f) });
		cb.setPreferredSize(new Dimension(80, 20));
		cb.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				JComboBox c = (JComboBox) e.getSource();
				stepLength = ((Float) c.getSelectedItem()).floatValue();
			}
		});
		box.add(cb);
		p.add(box);

		panel.add(p, BorderLayout.CENTER);

		getContentPane().add(panel, BorderLayout.CENTER);

		p = new JPanel(new FlowLayout(FlowLayout.RIGHT));
		s = MolecularContainer.getInternationalText("OK");
		JButton b = new JButton(s != null ? s : "OK");
		b.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				dispose();
			}
		});
		p.add(b);

		getContentPane().add(p, BorderLayout.SOUTH);

		pack();

	}