@Autowired
	public QuestTableView(final Requests requests) {
		super("Zagadki");

		questList = null;
		try {
			questList = requests.getAllQuests();
		} catch (Exception e1) {
			JOptionPane.showMessageDialog(null, "Sprawdz polaczenie z internetem");
		}

		setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
		setBounds(400, 200, 452, 361);
		setSize(new Dimension(400, 260));
		Toolkit toolkt = Toolkit.getDefaultToolkit();
		Dimension screenSize = toolkt.getScreenSize();
		this.setLocation(screenSize.width / 4, screenSize.height / 4);

		
		contentPane = new JPanel();
		setLayout(new BorderLayout());
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		
		add(contentPane);

		deleteQuest = new JButton("Usun zagadke");

		deleteQuest.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
				try {
					requests.delete((String) tableModel.getValueAt(rowNum, 0), "/deleteQuest");
					tableModel.removeRow(rowNum);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});

		deleteQuest.setBounds(257, 250, 164, 25);
		
		addTable();
		addRowToTable(questList);
		downPanel = new JPanel(new FlowLayout());
		downPanel.add(deleteQuest);
		contentPane.add(downPanel, BorderLayout.SOUTH);
	}