public VariableCreator() {
		setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
		if(System.getProperty("resources") == null)
			System.setProperty("resources", System.getProperty("user.dir") + "/resources");
		
		setBounds(100, 100, 450, 300);
		getContentPane().setLayout(new BorderLayout());
		contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5));
		getContentPane().add(contentPanel, BorderLayout.CENTER);
		contentPanel.setLayout(null);
		{
			JSplitPane splitPane = new JSplitPane();
			splitPane.setBounds(0, 0, 434, 229);
			contentPanel.add(splitPane);
			{
				JScrollPane scrollPane = new JScrollPane();
				splitPane.setLeftComponent(scrollPane);
				{
					listModel = new DefaultListModel<String>();
					fillList();
					
					list = new JList<String>(listModel);
					list.addMouseListener(new MouseAdapter() {
						@Override
						public void mouseClicked(MouseEvent e) {
							if(e.getClickCount() == 2 || e.getButton() == MouseEvent.BUTTON3) {
								addPopup(e.getX(), e.getY());
							} else {
								if(list.getSelectedIndex() != -1 && list.getSelectedValue() != null) {
									enableEdit();
								} else
									disableEdit();
							}
						}
					});
					list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
					scrollPane.setViewportView(list);
				}
			}
			{
				JPanel panel = new JPanel();
				splitPane.setRightComponent(panel);
				panel.setLayout(null);
				
				JLabel lblName = new JLabel("Name:");
				lblName.setBounds(10, 11, 46, 14);
				panel.add(lblName);
				
				nameField = new JTextField();
				nameField.setEnabled(false);
				nameField.setBounds(66, 8, 86, 20);
				panel.add(nameField);
				nameField.setColumns(10);
				
				JSeparator separator = new JSeparator();
				separator.setBounds(10, 36, 258, 6);
				panel.add(separator);
				
				JLabel lblString = new JLabel("String:");
				lblString.setBounds(10, 53, 46, 14);
				panel.add(lblString);
				
				stringField = new JTextField();
				stringField.setEnabled(false);
				stringField.setBounds(10, 78, 86, 20);
				panel.add(stringField);
				stringField.setColumns(10);
				
				JLabel lblInteger = new JLabel("Integer:");
				lblInteger.setBounds(106, 53, 46, 14);
				panel.add(lblInteger);
				
				intSpinner = new JSpinner();
				intSpinner.setEnabled(false);
				intSpinner.setBounds(106, 78, 86, 20);
				panel.add(intSpinner);
				
				JLabel lblBoolean = new JLabel("Boolean:");
				lblBoolean.setBounds(10, 109, 46, 14);
				panel.add(lblBoolean);
				
				booleanBox = new JCheckBox("True");
				booleanBox.setEnabled(false);
				booleanBox.setBounds(10, 130, 86, 23);
				panel.add(booleanBox);
				
				JLabel lblFloat = new JLabel("Float:");
				lblFloat.setBounds(106, 109, 46, 14);
				panel.add(lblFloat);
				
				floatSpinner = new JSpinner();
				floatSpinner.setEnabled(false);
				floatSpinner.setModel(new SpinnerNumberModel(new Float(0), null, null, new Float(1)));
				floatSpinner.setBounds(106, 131, 86, 20);
				panel.add(floatSpinner);
				
				save = new JButton("Save");
				save.setEnabled(false);
				save.addActionListener(new ActionListener() {
					public void actionPerformed(ActionEvent e) {
						parseVariable();
					}
				});
				save.setBounds(10, 162, 76, 25);
				panel.add(save);
				
				remove = new JButton("Remove");
				remove.setEnabled(false);
				remove.addActionListener(new ActionListener() {
					public void actionPerformed(ActionEvent arg0) {
						listModel.remove(list.getSelectedIndex());
						list.clearSelection();
						disableEdit();
					}
				});
				remove.setBounds(106, 162, 76, 25);
				panel.add(remove);
			}
			splitPane.setDividerLocation(0.35);
		}
		{
			JPanel buttonPane = new JPanel();
			buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT));
			getContentPane().add(buttonPane, BorderLayout.SOUTH);
			{
				JButton okButton = new JButton("OK");
				okButton.addActionListener(new ActionListener() {
					public void actionPerformed(ActionEvent arg0) {
						try {
							saveVariables();
						} catch (IOException e) {
							e.printStackTrace();
						}
						dispose();
					}
				});
				okButton.setActionCommand("OK");
				buttonPane.add(okButton);
				getRootPane().setDefaultButton(okButton);
			}
			{
				JButton cancelButton = new JButton("Cancel");
				cancelButton.addActionListener(new ActionListener() {
					public void actionPerformed(ActionEvent arg0) {
						dispose();
					}
				});
				cancelButton.setActionCommand("Cancel");
				buttonPane.add(cancelButton);
			}
		}
		
		setModalityType(ModalityType.APPLICATION_MODAL);
		setVisible(true);
	}