public MainGui(Core c, String f) {
		super("Fabrication file converter");
		buttonListener = new ButtonListener(c);
		// setTitle("Fabrication file converter");
		this.core = c;
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setBounds(100, 100, 450, 300);

		JMenuBar menuBar = new JMenuBar();
		setJMenuBar(menuBar);

		JMenu mnFile = new JMenu("File");
		menuBar.add(mnFile);

		mnFile.add(mntmLoadFile);
		mntmLoadFile.setActionCommand("loadfile");
		mntmLoadFile.addActionListener(buttonListener);

		mnFile.add(mntmConvertFile);
		mntmConvertFile.setActionCommand("convert");
		mntmConvertFile.addActionListener(buttonListener);

		mnFile.add(mntmOptions);
		mntmOptions.setActionCommand("options");
		mntmOptions.addActionListener(buttonListener);
		
		mnFile.add(mntmSettings);
		mntmSettings.setActionCommand("settings");
		mntmSettings.addActionListener(buttonListener);
		
		contentPane = new JPanel();
		contentPane.setBorder(new BevelBorder(BevelBorder.LOWERED, null, null,
		    null, null));
		setContentPane(contentPane);
		contentPane.setLayout(new BorderLayout(0, 0));
		
		JScrollPane scrollPane = new JScrollPane();
		scrollPane.setAlignmentY(Component.TOP_ALIGNMENT);
		contentPane.add(scrollPane);
		ContentBox.setWrapStyleWord(true);
		scrollPane.setViewportView(ContentBox);
		ContentBox.setLineWrap(true);

		this.addWindowListener(new MainGuiWindowListener(c.settings));

		if (f != "file.is.not.selected") {
			this.setVisible(true);
			System.out.println("Filename : " + f);
			FileEnd f_ = core.checkFileEnd(f);
			mntmLoadFile.setEnabled(true);
			mntmOptions.setEnabled(true);
			mntmConvertFile.setEnabled(true);
			ArrayList<String> buttons = f_.getDisabledButtons();
			if (buttons.size() > 0) {
				for (String s : buttons) {
					if (s.equalsIgnoreCase("load file")) {
						mntmLoadFile.setEnabled(false);
					} else if (s.equalsIgnoreCase("options")) {
						mntmOptions.setEnabled(false);
					} else if (s.equalsIgnoreCase("convert")) {
						mntmConvertFile.setEnabled(false);
					}
				}
			}
			f_.init();
			f_.converter.readIn(f);
			ContentBox.setText("");
			f_.converter.createPreview(ContentBox);
			filename = f;
		}
		setShortCut('O', mntmLoadFile);
		setShortCut('P', mntmOptions);
		setShortCut('S', mntmConvertFile);
		
		JMenuItem mntmSearchForUpdates = new JMenuItem("Search for updates");
		mntmSearchForUpdates.addActionListener(buttonListener);
		mntmSearchForUpdates.setActionCommand("update");
		mnFile.add(mntmSearchForUpdates);
	}