public void loadData(boolean isKrak)
	{
		final boolean isKrakB = isKrak;
		// Solution with thread taken from StackOverflow: http://stackoverflow.com/questions/9419252/why-does-this-simple-java-swing-program-freeze
		Thread thread = new Thread() {
			@Override
			@SuppressWarnings("empty-statement")
			public void run()
			{
				frameChooser.setVisible(false);
				frameChooser.dispose();

				db = Database.db(isKrakB); // true for krak
				lframe = new LoadingFrame();

				timer = new Timer();
				TimerTask task = new TimerTask() {

					@Override
					public void run()
					{
						lframe.updateLoadingBar(db.getNodesDownloadedPct(), db.getEdgesDownloadedPct(), db.getStreetsDownloadedPct());
						if (db.getStreetsDownloadedPct() == 1)
						{
							timer.cancel();
							timer.purge();
						}
					}
				};
				timer.scheduleAtFixedRate(task, 1000, 100);

				List<Edge> edges = db.getEdgeList();
				QuadTree quadTree = db.getQuadTree();

				graph = new WeightedMapGraph(edges);
				AddressFinder addressFinder = new AddressFinder(edges);

				List<PolygonShape> landShapePolygons = new ArrayList<>();
				List<PolygonShape> landUsePolygons = new ArrayList<>();
				if (!isKrakB)
				{
					ShapeFileParser shapeParser = new ShapeFileParser();

					landShapePolygons = shapeParser.getLandShapePolygons();

					landUsePolygons = shapeParser.getLandUsePolygons();
				}
				mainframe = new MainFrame(quadTree, landShapePolygons, landUsePolygons, addressFinder); // brug disse 

				//mainframe = new MainFrame(new QuadTree(null, 0, 0, 0)); // brug denne hvis du ikke vil loade
				lframe.setVisible(false);
				lframe.dispose();
			}
		};
		thread.start();

	}