public void vypis(javax.swing.JPanel p){
        p.setLayout(new java.awt.GridLayout(matice.length,matice[0].length));
        Border border = BorderFactory.createLineBorder(Color.BLACK,1);
        for (int i = 0; i < matice.length; i++) {
            for (int j = 0; j < matice[0].length; j++) {
                JTextField lab=new JTextField(String.format("%.3f",matice[i][j]));
                lab.setHorizontalAlignment(JTextField.CENTER);
                lab.setEditable(false);
                lab.setBorder(border);
                p.add(lab);
            //    p.add(new JLabel(String.format("%.2f",matice[i][j])).setBorder(border));
            }
        }
    }