@Override
	public void createView() {

		mainWindowFrame = new JFrame();
		mainWindowFrame.setTitle("XQuery Tester");
		mainWindowFrame.setBounds(100, 100, 1142, 831);
		mainWindowFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

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

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

		JMenuItem mntmNewProject = new JMenuItem("New Project");
		mntmNewProject.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				controller.createProject();
			}
		});
		mnNew.add(mntmNewProject);

		JMenuItem mntmNewMenuItem = new JMenuItem("Open Project");
		mntmNewMenuItem.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				JFileChooser fc = new JFileChooser();

				fc.setAcceptAllFileFilterUsed(false);
				fc.addChoosableFileFilter(new XqtprjFilter());
				
				fc.setCurrentDirectory(controller.getCurrentDir());	
				
				int returnVal = fc.showOpenDialog(mainWindowFrame);

				if (returnVal == JFileChooser.APPROVE_OPTION) {
					File f = fc.getSelectedFile();
					controller.openProject(f);
					controller.setCurrentDir(f.getParentFile());
					
				}
				
			}
		});
		mnNew.add(mntmNewMenuItem);

		JMenuItem mntmSave = new JMenuItem("Save Project");
		mntmSave.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				JFileChooser fc = new JFileChooser();

				fc.setAcceptAllFileFilterUsed(false);
				fc.addChoosableFileFilter(new XqtprjFilter());
				
				fc.setCurrentDirectory(controller.getCurrentDir());	
				
				int returnVal = fc.showOpenDialog(mainWindowFrame);

				if (returnVal == JFileChooser.APPROVE_OPTION) {
					File f = fc.getSelectedFile();
					controller.saveProject(f);
					controller.setCurrentDir(f.getParentFile());
					
				}
			}
		});
		mnNew.add(mntmSave);

		JMenuItem mntmExit = new JMenuItem("Exit");
		mntmExit.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				controller.exitApplication();

			}
		});

		mnNew.add(mntmExit);

		JMenu mnAddTest = new JMenu("Edit");
		menuBar.add(mnAddTest);

		JMenuItem mntmAddTest = new JMenuItem("Add Test");
		mntmAddTest.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				controller.addTest();
			}
		});
		mnAddTest.add(mntmAddTest);

		JMenuItem mntmEditTest = new JMenuItem("Edit Test");
		mntmEditTest.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				int row = table.getSelectedRow();
				if(row>=0)
					controller.editTest(row);
				
			}
		});
		mnAddTest.add(mntmEditTest);

		JMenuItem mntmRemoveTest = new JMenuItem("Remove Test");
		mntmRemoveTest.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				controller.removeTest();
			}
		});
		mnAddTest.add(mntmRemoveTest);

		JMenuItem mntmRemoveAllTests = new JMenuItem("Remove All Tests");
		mntmRemoveAllTests.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				controller.removeAllTests();
			}
		});
		mnAddTest.add(mntmRemoveAllTests);

		JMenu mnRun = new JMenu("Run");
		menuBar.add(mnRun);

		JMenuItem mntmRunAllTests = new JMenuItem("Run All Tests");
		mntmRunAllTests.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				controller.runAllTests();

			}
		});
		mnRun.add(mntmRunAllTests);
		mainWindowFrame.getContentPane().setLayout(null);

		JScrollPane scrollPane = new JScrollPane();
		scrollPane.setBounds(10, 11, 1106, 203);
		mainWindowFrame.getContentPane().add(scrollPane);

		final JPopupMenu popupMenu = new JPopupMenu();
		addPopup(scrollPane, popupMenu);
		JMenuItem mntmResultedXml = new JMenuItem("Resulted XML");
		mntmResultedXml.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {

			}
		});
		popupMenu.add(mntmResultedXml);

		table = new JTable();
		table.addMouseListener(new MouseAdapter() {
			@Override
			public void mouseClicked(MouseEvent e) {
				JTable target = (JTable) e.getSource();
				int row = target.getSelectedRow();

				if (e.getClickCount() == 2) {
					controller.editTest(row);
				} else {
					controller.selectTest(row);
				}
				

			}

			public void mouseReleased(MouseEvent e) {
				int r = table.rowAtPoint(e.getPoint());
				if (r >= 0 && r < table.getRowCount()) {
					table.setRowSelectionInterval(r, r);
				} else {
					table.clearSelection();
				}

				int rowindex = table.getSelectedRow();
				if (rowindex < 0)
					return;
				if (e.isPopupTrigger() && e.getComponent() instanceof JTable) {
					popupMenu.show(e.getComponent(), e.getX(), e.getY());
				}
			}

		});
		table.setModel((TableModel) model);
		table.getColumnModel().getColumn(2).setMaxWidth(100);

		scrollPane.setViewportView(table);
		scrollPane.setFocusTraversalPolicy(new FocusTraversalOnArray(
				new Component[] { table }));

		JScrollPane scrollPane_1 = new JScrollPane();
		scrollPane_1.setBounds(10, 571, 1106, 165);
		mainWindowFrame.getContentPane().add(scrollPane_1);

		textPaneBottom = new JTextPane();
		textPaneBottom.setEditable(false);
		scrollPane_1.setViewportView(textPaneBottom);

		JLabel lblNewLabel = new JLabel("Total:");
		lblNewLabel.setBounds(794, 747, 33, 14);
		mainWindowFrame.getContentPane().add(lblNewLabel);

		label_totalTests = new JLabel("0");
		label_totalTests.setBounds(837, 747, 46, 14);
		mainWindowFrame.getContentPane().add(label_totalTests);

		JLabel lblNewLabel_2 = new JLabel("Success:");
		lblNewLabel_2.setBounds(893, 747, 55, 14);
		mainWindowFrame.getContentPane().add(lblNewLabel_2);

		label_successTests = new JLabel("0");
		label_successTests.setBounds(958, 747, 46, 14);
		mainWindowFrame.getContentPane().add(label_successTests);

		JLabel lblFailure = new JLabel("Failure:");
		lblFailure.setBounds(1014, 747, 46, 14);
		mainWindowFrame.getContentPane().add(lblFailure);

		label_failureTests = new JLabel("0");
		label_failureTests.setBounds(1070, 747, 46, 14);
		mainWindowFrame.getContentPane().add(label_failureTests);

		JScrollPane scrollPane_2 = new JScrollPane();
		scrollPane_2.setBounds(10, 225, 529, 335);
		mainWindowFrame.getContentPane().add(scrollPane_2);

		textPaneLeft = new JTextPane();
		scrollPane_2.setViewportView(textPaneLeft);

		JScrollPane scrollPane_3 = new JScrollPane();
		scrollPane_3.setBounds(549, 225, 567, 335);
		mainWindowFrame.getContentPane().add(scrollPane_3);

		textPaneRight = new JTextPane();
		scrollPane_3.setViewportView(textPaneRight);
	}