private void createContentPane() {

		if (contentPane != null)
			return;

		contentPane = new JPanel(new BorderLayout());

		ActionListener okListener = new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				confirm();
				dialog.dispose();
				cancel = false;
			}
		};

		JPanel bottomPanel = new JPanel(new BorderLayout(10, 10));
		bottomPanel.setBorder(BorderFactory.createEmptyBorder(0, 10, 10, 10));
		contentPane.add(bottomPanel, BorderLayout.SOUTH);

		bottomPanel
				.add(
						new JLabel(
								"<html>&#8224; <font size=2>An input between 0 and 1 sets width relative to page.<br>&#8225; Custom initialization script will be executed following the system-set initialization script<br>after data loading.</font></html>"),
						BorderLayout.CENTER);
		JPanel p = new JPanel(new FlowLayout(FlowLayout.RIGHT));
		bottomPanel.add(p, BorderLayout.SOUTH);

		String s = Modeler.getInternationalText("OKButton");
		okButton = new JButton(s != null ? s : "OK");
		okButton.addActionListener(okListener);
		p.add(okButton);

		s = Modeler.getInternationalText("CancelButton");
		JButton button = new JButton(s != null ? s : "Cancel");
		button.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				dialog.dispose();
				cancel = true;
			}
		});
		p.add(button);

		p = new JPanel(new BorderLayout(10, 10));
		p.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
		contentPane.add(p, BorderLayout.CENTER);

		JPanel p1 = new JPanel(new SpringLayout());

		// row 1
		s = Modeler.getInternationalText("WidthLabel");
		p1.add(new JLabel((s != null ? s : "Width") + " \u2020", SwingConstants.LEFT));
		widthField = new FloatNumberTextField(400, 0.01f, 1200);
		widthField.setToolTipText("A value in (0, 1] will be considered relative to the width of the page.");
		widthField.setMaximumFractionDigits(4);
		widthField.addActionListener(okListener);
		p1.add(widthField);

		// row 2
		s = Modeler.getInternationalText("HeightLabel");
		p1.add(new JLabel(s != null ? s : "Height", SwingConstants.LEFT));
		heightField = new FloatNumberTextField(400, 0.01f, 1000);
		heightField.setToolTipText("A value in (0, 1] will be considered relative to the height of the page.");
		heightField.setMaximumFractionDigits(4);
		heightField.addActionListener(okListener);
		p1.add(heightField);

		// row 3
		s = Modeler.getInternationalText("BackgroundColorLabel");
		p1.add(new JLabel(s != null ? s : "Background effect", SwingConstants.LEFT));
		bgComboBox = new BackgroundComboBox(pageMolecularViewer, ModelerUtilities.colorChooser,
				ModelerUtilities.fillEffectChooser);
		bgComboBox.setRequestFocusEnabled(false);
		bgComboBox.setToolTipText("Select the background effect.");
		bgComboBox.getColorMenu().addNoFillListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				pageMolecularViewer.changeFillMode(FillMode.getNoFillMode());
			}
		});
		bgComboBox.getColorMenu().addFillEffectListeners(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				pageMolecularViewer.changeFillMode(bgComboBox.getColorMenu().getFillEffectChooser().getFillMode());
			}
		}, null);
		bgComboBox.getColorMenu().addColorArrayListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				pageMolecularViewer.changeFillMode(new FillMode.ColorFill(bgComboBox.getColorMenu().getColor()));
			}
		});
		bgComboBox.getColorMenu().addMoreColorListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				pageMolecularViewer.changeFillMode(new FillMode.ColorFill(bgComboBox.getColorMenu().getColorChooser()
						.getColor()));
			}
		});
		bgComboBox.getColorMenu().addHexColorListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				FillMode fm = pageMolecularViewer.getFillMode();
				Color c = bgComboBox.getColorMenu().getHexInputColor(
						fm instanceof FillMode.ColorFill ? ((FillMode.ColorFill) fm).getColor() : null);
				if (c == null)
					return;
				pageMolecularViewer.changeFillMode(new FillMode.ColorFill(c));
			}
		});
		p1.add(bgComboBox);

		// row 4
		s = Modeler.getInternationalText("BorderLabel");
		p1.add(new JLabel(s != null ? s : "Border", SwingConstants.LEFT));
		borderComboBox = new JComboBox(BorderManager.BORDER_TYPE);
		borderComboBox.setPreferredSize(new Dimension(150, 20));
		borderComboBox.setRenderer(new ComboBoxRenderer.BorderCell());
		borderComboBox.setBackground(p1.getBackground());
		borderComboBox.setToolTipText("Select the border type for this component.");
		p1.add(borderComboBox);

		ModelerUtilities.makeCompactGrid(p1, 4, 2, 5, 5, 10, 2);

		p.add(p1, BorderLayout.NORTH);

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

		JPanel p2 = new JPanel(new BorderLayout());
		p2.setBorder(BorderFactory.createCompoundBorder(BorderFactory
				.createTitledBorder("Initialization script (system-set, non-editable):"), BorderFactory
				.createEmptyBorder(8, 8, 8, 8)));
		scriptArea1 = new PastableTextArea(5, 5);
		scriptArea1.setBorder(BorderFactory.createLoweredBevelBorder());
		scriptArea1.setEditable(false);
		scriptArea1.setEnabled(false);
		p2.add(new JScrollPane(scriptArea1), BorderLayout.CENTER);
		p1.add(p2, BorderLayout.NORTH);

		p2 = new JPanel(new BorderLayout());
		p2.setBorder(BorderFactory.createCompoundBorder(BorderFactory
				.createTitledBorder("Custom initialization script (user-set, editable):\u2021"), BorderFactory
				.createEmptyBorder(8, 8, 8, 8)));
		scriptArea2 = new PastableTextArea(5, 10);
		scriptArea2.setBorder(BorderFactory.createLoweredBevelBorder());
		p2.add(new JScrollPane(scriptArea2), BorderLayout.CENTER);
		p1.add(p2, BorderLayout.CENTER);

	}