public MainFrame() {
		lf = null;
		sponsorlopen = new ArrayList<Sponsorloop>();
		setSize(200, 200);
		lab1 = new JLabel("Sponsorlopen", JLabel.CENTER);
		lab2 = new JLabel();
		
		listModel = new DefaultListModel();
		list = new JList(listModel);
		list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
		deselect();
		list.setVisibleRowCount(5);
		b1 = new JButton("Nieuwe Sponsorloop");
		b2 = new JButton("Verwijder Sponsorloop");
		JScrollPane listScrollPane = new JScrollPane(list);
		JPanel lowerPane = new JPanel();
		// lowerPane.setLayout(new BoxLayout(lowerPane, BoxLayout.Y_AXIS));
		lowerPane.setLayout(new BorderLayout());

		//Wat er gebeurt bij veranderen van selectie in het menu
		list.addListSelectionListener(new ListSelectionListener() {
			@Override
			public void valueChanged(ListSelectionEvent arg0) {
				if (!arg0.getValueIsAdjusting()) {
					if (lf != null) {
						lf.dispose();
						if (lf.getSf() != null) {
							lf.getSf().dispose();
						}
					}
					if (list.getSelectedValue() != null) {
						lf = new LoperFrame(vindLoop((String) list
								.getSelectedValue()));
						updateAantal();
						b2.setEnabled(true);;
						geefDoor();
					}
					if (list.getSelectedValue() == null) {
						b2.setEnabled(false);
					}

				}
			}
		});
		
		add(lab1, BorderLayout.NORTH);
		lowerPane.add(lab2, BorderLayout.NORTH);
		lowerPane.add(b1, BorderLayout.CENTER);
		lowerPane.add(b2, BorderLayout.SOUTH);
		b2.setEnabled(false);
		add(listScrollPane, BorderLayout.CENTER);
		add(lowerPane, BorderLayout.SOUTH);

		b1.addActionListener(this);
		b2.addActionListener(this);
		
		Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
		this.setLocation(250, dim.height / 2 - this.getSize().height / 2);
		setVisible(true);
		setDefaultCloseOperation(EXIT_ON_CLOSE);

	}