public MainForm(Main main, ControladorPresentacioPacients controladorPacients,
            ControladorPresentacioSimptomes controladorSimptomes,
            ControladorPresentacioMalalties controladorMalalties,
            ControladorPresentacioSequencies controladorSequencies, ControladorPresentacioEstudis controladorEstudis) {
        this.main = main;

        initComponents();
        panelPacients = new PanelPacients(controladorPacients, controladorSimptomes, controladorMalalties);
        panelSimptomes = new PanelSimptomes(controladorSimptomes, controladorMalalties, controladorPacients);
        panelMalalties = new PanelMalalties(controladorMalalties, controladorSequencies, controladorSimptomes, controladorPacients);
        panelSequencies = new PanelSequencies(controladorSequencies);
        panelNousPatrons = new PanelNousPatrons(controladorEstudis, controladorPacients, controladorMalalties, controladorSimptomes);
        panelPatronsConeguts = new PanelPatronsConeguts(controladorEstudis, controladorPacients, controladorMalalties, controladorSimptomes, controladorSequencies);
        panelResultats = new PanelResultats(controladorEstudis);
        dialogAlfabet = new DialogAlfabet(controladorSequencies);
        ajuda = new Ajuda();
        modificat = false;

        GraphicsEnvironment graphicsEnvironment = GraphicsEnvironment.getLocalGraphicsEnvironment();

        Rectangle rectangle = graphicsEnvironment.getMaximumWindowBounds();

        int width = rectangle.width;
        int height = rectangle.height;

        setSize(width - 50, height - 50);


//        String nomResultat = "resultat";        
//        jPanelContingut.add(new MainFerran(nomResultat,controladorEstudis));

        cambiarVistaDades(VISTA_PACIENTS); // Fiquem la vista que toqui
        URL locas[] = new URL[8];
        ImageIcon icono;
        locas[0] = ClassLoader.getSystemResource("edu/upc/prop/icons/pacients.png");
        locas[1] = ClassLoader.getSystemResource("edu/upc/prop/icons/malalties.png");
        locas[2] = ClassLoader.getSystemResource("edu/upc/prop/icons/simptomes.png");
        locas[3] = ClassLoader.getSystemResource("edu/upc/prop/icons/sequencia.png");
        locas[4] = ClassLoader.getSystemResource("edu/upc/prop/icons/add.png");
        locas[5] = ClassLoader.getSystemResource("edu/upc/prop/icons/edit.png");
        locas[6] = ClassLoader.getSystemResource("edu/upc/prop/icons/remove.png");
        locas[7] = ClassLoader.getSystemResource("edu/upc/prop/icons/genome.png");
        if (locas[0] != null) {
            icono = new ImageIcon(Toolkit.getDefaultToolkit().getImage(locas[0]));
            jButtonPacients.setIcon(icono);
            jButtonPacients.setText("Pacients");
        }
        if (locas[1] != null) {
            icono = new ImageIcon(Toolkit.getDefaultToolkit().getImage(locas[1]));
            jButtonMalalties.setIcon(icono);
            jButtonMalalties.setText("Malalties");
        }
        if (locas[2] != null) {
            icono = new ImageIcon(Toolkit.getDefaultToolkit().getImage(locas[2]));
            jButtonSimptomes.setIcon(icono);
            jButtonSimptomes.setText("Símptomes");
        }
        if (locas[3] != null) {
            icono = new ImageIcon(Toolkit.getDefaultToolkit().getImage(locas[3]));
            jButtonSequencies.setIcon(icono);
            jButtonSequencies.setText("Seqüències");
        }
        if (locas[4] != null) {
            icono = new ImageIcon(Toolkit.getDefaultToolkit().getImage(locas[4]));
            jButtonAfegir.setIcon(icono);
            jButtonAfegir.setText("");
        }

        if (locas[5] != null) {
            icono = new ImageIcon(Toolkit.getDefaultToolkit().getImage(locas[5]));
            jButtonModificar.setIcon(icono);
            jButtonModificar.setText("");
        }
        if (locas[6] != null) {
            icono = new ImageIcon(Toolkit.getDefaultToolkit().getImage(locas[6]));
            jButtonEliminar.setIcon(icono);
            jButtonEliminar.setText("");
        }
        if (locas[7] != null) {
            setIconImage(Toolkit.getDefaultToolkit().getImage(locas[7]));
        }

        addWindowListener(new WindowAdapter() {

            @Override
            public void windowClosing(WindowEvent e) {
                sortir();
            }
        });

        // setDefaultCloseOperation(EXIT_ON_CLOSE);
        setLocationRelativeTo(null); // Es centra al centre de la pantalla

        jButtonPacients.setSelected(true);

    }