public GravityEditor(Frame owner) {

		super(owner, "Change Gravity", false);
		String s = MDView.getInternationalText("ChangeGravity");
		if (s != null)
			setTitle(s);
		setResizable(false);
		setSize(160, 240);
		setDefaultCloseOperation(DISPOSE_ON_CLOSE);

		Container container = getContentPane();
		container.setLayout(new BorderLayout());

		slider = new JSlider(JSlider.VERTICAL, 0, 25, (int) (gravity * 1000));
		slider.setToolTipText(s != null ? s : "Change the gravity");
		slider.setPaintLabels(true);
		slider.setPaintTicks(true);
		slider.setPaintTrack(true);
		slider.setSnapToTicks(true);
		slider.setMajorTickSpacing(5);
		slider.setMinorTickSpacing(1);
		slider.setBorder(BorderFactory.createTitledBorder("g (m/s^2)"));
		slider.putClientProperty("JSlider.isFilled", Boolean.TRUE);

		Hashtable<Integer, JLabel> tableOfLabels = new Hashtable<Integer, JLabel>();
		JLabel label5 = new JLabel("500");
		JLabel label4 = new JLabel("400");
		JLabel label3 = new JLabel("300");
		JLabel label2 = new JLabel("200");
		JLabel label1 = new JLabel("100");
		JLabel label0 = new JLabel("0");
		label0.setFont(smallItalicFont);
		label1.setFont(smallItalicFont);
		label2.setFont(smallItalicFont);
		label3.setFont(smallItalicFont);
		label4.setFont(smallItalicFont);
		label5.setFont(smallItalicFont);
		tableOfLabels.put(25, label5);
		tableOfLabels.put(20, label4);
		tableOfLabels.put(15, label3);
		tableOfLabels.put(10, label2);
		tableOfLabels.put(5, label1);
		tableOfLabels.put(0, label0);

		slider.setLabelTable(tableOfLabels);
		slider.addChangeListener(new ChangeListener() {
			public void stateChanged(ChangeEvent e) {
				if (model == null)
					return;
				GravitationalField gf = (GravitationalField) model.getNonLocalField(GravitationalField.class.getName());
				if (gf == null)
					return;
				JSlider source = (JSlider) e.getSource();
				if (!source.getValueIsAdjusting()) {
					gravity = source.getValue() * 0.001;
					gf.setIntensity(gravity);
				}
			}
		});

		JPanel p = new JPanel(new BorderLayout(5, 5));
		p.add(slider, BorderLayout.CENTER);

		s = MDView.getInternationalText("Downward");
		p.add(new JLabel(s != null ? s : "Always downward"), BorderLayout.SOUTH);

		container.add(p, BorderLayout.WEST);

		JLabel imageLabel = new JLabel(new ImageIcon(getClass().getResource("images/gravityIcon.gif")));

		p = new JPanel(new BorderLayout());
		p.add(imageLabel, BorderLayout.CENTER);

		container.add(p, BorderLayout.EAST);

		p = new JPanel(new FlowLayout(FlowLayout.RIGHT));

		s = MDView.getInternationalText("ApplyField");
		checkBox = new JCheckBox(s != null ? s : "Apply");
		checkBox.setSelected(false);
		checkBox.setFocusPainted(false);
		checkBox.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				slider.setEnabled(checkBox.isSelected());
				if (checkBox.isSelected()) {
					model.addNonLocalField(new GravitationalField(gravity, model.getView().getBounds()));
				}
				else {
					model.removeField(GravitationalField.class.getName());
				}
			}
		});
		p.add(checkBox, BorderLayout.CENTER);

		s = MDView.getInternationalText("CloseButton");
		JButton button = new JButton(s != null ? s : "Close");
		button.setFocusPainted(false);
		button.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				GravityEditor.this.dispose();
			}
		});
		p.add(button);

		container.add(p, BorderLayout.SOUTH);

	}