public Visualisation(final JFrame window) {
        JPanel contents = new JPanel();
        window.setMinimumSize(new Dimension(1392,1000));
        window.setMaximumSize(new Dimension(1492, 1052));
        visualisation = new Display();
        contents.add(visualisation, BorderLayout.CENTER);
        window.getContentPane().add(contents);
        contents.setLayout(new BorderLayout(0, 0));
        
        JPanel display = new JPanel();
        contents.add(display, BorderLayout.CENTER);
        display.setLayout(new BorderLayout());
        display.add(visualisation);
        JPanel inputs = new JPanel();
        contents.add(inputs, BorderLayout.EAST);
        inputs.setLayout(new MigLayout("", "[31px,grow][grow]", "[14px][][][][][][][][][][][grow]"));
        inputs.setMinimumSize(new Dimension(200,1000));
        
        JLabel lblInputs = new JLabel("Inputs");
        inputs.add(lblInputs, "cell 0 0,alignx left,aligny top");

        JLabel lblEpsilon = new JLabel("Epsilon");
        inputs.add(lblEpsilon, "cell 0 1");

        spinner_epsilon = new JSpinner();
        final SpinnerNumberModel epsilonNumberModel = new SpinnerNumberModel(
                new Integer(epsilon), new Integer(0), null, new Integer(30));
        spinner_epsilon.setModel(epsilonNumberModel);
        spinner_epsilon.addChangeListener(new ChangeListener() {

            @Override
            public void stateChanged(ChangeEvent e) {
                epsilon = (Integer) epsilonNumberModel.getNumber();
                btnRecalculateClusters.setEnabled(false);
            }
        });
        inputs.add(spinner_epsilon, "cell 1 1,growx");

        JLabel lblMinPoints = new JLabel("Min Points");
        inputs.add(lblMinPoints, "cell 0 2");

        final SpinnerNumberModel minptsNumberModel = new SpinnerNumberModel(
                new Integer(minpts), new Integer(1), null, new Integer(1));
        spinner_minpts = new JSpinner();
        spinner_minpts.setModel(minptsNumberModel);
        inputs.add(spinner_minpts, "cell 1 2,growx");
        spinner_minpts.addChangeListener(new ChangeListener() {

            @Override
            public void stateChanged(ChangeEvent e) {
                minpts = (Integer) minptsNumberModel.getNumber();
                if(points_loaded) {
                    resetClusters();
                    btnRecalculateClusters.setEnabled(true);
                }
            }
        });

        JButton btnReloadFile = new JButton("Load File");
        inputs.add(btnReloadFile, "cell 0 4 2 1,growx");
        btnReloadFile.addActionListener(new ActionListener() {

            @Override
            public void actionPerformed(ActionEvent arg0) {
                loadPoints();
            }
        });
        JSpinner spinner = new JSpinner();
        final SpinnerNumberModel randomPointCountModel = new SpinnerNumberModel(new Integer(10), new Integer(1), null, new Integer(1));
        
        JButton btnExportClusters = new JButton("Export Clusters");
        btnExportClusters.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent arg0) {
                exportClusters();
            }
        });
        inputs.add(btnExportClusters, "cell 0 5 2 1,growx");
        spinner.setModel(randomPointCountModel);
        inputs.add(spinner, "cell 1 6,growx");
        JButton btnLoadRandomPoints = new JButton("Load Random Points");
        btnLoadRandomPoints.addActionListener(new ActionListener() {
            
            @Override
            public void actionPerformed(ActionEvent e) {
                loadRandomPoints((Integer) randomPointCountModel.getNumber());
            }
        });
        inputs.add(btnLoadRandomPoints, "cell 0 6,growx");

        btnRecalculateClusters = new JButton("Recalculate Clusters");
        btnRecalculateClusters.addActionListener(new ActionListener() {
            
            @Override
            public void actionPerformed(ActionEvent e) {
                runClustering();
            }
        });
        inputs.add(btnRecalculateClusters, "cell 0 8 2 1,growx");

        tglbtnStart = new JToggleButton("Start");
        inputs.add(tglbtnStart, "cell 0 9 2 1,growx");

        tglbtnStart.addActionListener(new ActionListener() {
            
            @Override
            public void actionPerformed(ActionEvent arg0) {
                if (tglbtnStart.isSelected()) {
                    if (!points_loaded) {
                        loadPoints();
                    }
                    if(points_loaded) {
                        tglbtnStart.setText("Stop");
                        // Start the simulation
                        runNeighbouring();
                    } else {
                        tglbtnStart.setEnabled(false);
                    }
                } else {
                    tglbtnStart.setText("Start");
                    // Start the timer
                    stopNeighbouring();
                }
            }
        });

        progressBar = new JProgressBar(0,100);
        progressBar.setStringPainted(true);
        inputs.add(progressBar, "cell 0 10 2 1,growx");
        log = new JTextArea();
        log.setColumns(48);
      //  log.setWrapStyleWord(true);
        JScrollPane scrollPane = new JScrollPane(log);
        scrollPane.setViewportView(log);
        DefaultCaret caret = (DefaultCaret) log.getCaret();
        caret.setUpdatePolicy(DefaultCaret.ALWAYS_UPDATE);
        inputs.add(scrollPane, "cell 0 11 2 1,grow");
        
        contents.revalidate();
        clearCollections();
        fc = new JFileChooser();
        fc.setCurrentDirectory(new File(System.getProperty("user.dir")));
    }