public void luoKomponentit(Container container){
            this.nappeja = new XONappi[144];
           
            if (vaikeus == 3){
            GridLayout layout = new GridLayout(3,3);
            container.setLayout(layout);
            
            int i = 0;
            while (i<9){
               
                nappeja[i] = new XONappi(this);
                container.add(nappeja[i]);
                
                i++;
            }
           
            }
            if (vaikeus == 4){
                GridLayout layout = new GridLayout(8,8);
                container.setLayout(layout);
                int i = 0;
                while(i<64){
                    nappeja[i] = new XONappi(this);
                    container.add(nappeja[i]);
                    i++;
                }
            }
            if (vaikeus == 5){
                GridLayout layout = new GridLayout(12, 12);
                container.setLayout(layout);
                int i = 0;
                while(i<144){
                    nappeja[i] = new XONappi(this);
                    container.add(nappeja[i]);
                    
                    i++;
                }
            }
            
            
           
        }