public final void initUI() {

		panel = new JPanel();
		panel.setLayout(new BorderLayout());
		ImageIcon open = new ImageIcon("./files/img/open.png");

		JToolBar toolbar = new JToolBar();
		JButton openb = new JButton(open);

		openb.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent event) {
				JFileChooser fileopen = new JFileChooser("./");
				FileFilter filter = new FileNameExtensionFilter("c files", "c");
				fileopen.addChoosableFileFilter(filter);

				int ret = fileopen.showDialog(panel, "Open file");

				if (ret == JFileChooser.APPROVE_OPTION) {
					File file = fileopen.getSelectedFile();
					String text = readFile(file);
					area.setText(text);
				}
			}
		});

		toolbar.add(openb);

		area = new JTextArea();
		area.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));

		JScrollPane pane = new JScrollPane();
		pane.getViewport().add(area);

		panel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
		panel.add(pane);
		add(panel);

		add(toolbar, BorderLayout.NORTH);

		setTitle("FileChooserDialog");
		setSize(400, 300);
		setLocationRelativeTo(null);
		setDefaultCloseOperation(EXIT_ON_CLOSE);
	}