public Test(List<Location> locations)
    {
        frame.getContentPane().setLayout(new BorderLayout());
        JLabel loading = new JLabel("loading map...");
        JPanel mainPane = new JPanel();
        mainPane.setLayout(new BorderLayout());
        mainPane.add(loading, BorderLayout.CENTER);
        frame.setContentPane(mainPane);
        frame.pack();
        frame.setVisible(true);
        
        MapModel model = new MapModel(Files.getInstance());
        se.cth.hedgehogphoto.map.view.MapView map = new se.cth.hedgehogphoto.map.view.MapView(model);
        new MapController(map, Files.getInstance());

        mainPane.remove(loading);
        mainPane.add(map, BorderLayout.CENTER);
        frame.setPreferredSize(new Dimension(Constants.PREFERRED_MODULE_WIDTH + 20, Constants.PREFERRED_MODULE_HEIGHT+50));
        frame.pack();
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    }