private void initialize() {
        frame = new JFrame();
        frame.setBounds(100, 100, 900, 600);
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        frame.getContentPane().setLayout(null);

        _inputCount = new JTextField();
        _inputCount.setText("2");
        _inputCount.setBounds(96, 12, 32, 19);
        //frame.getContentPane().add(_inputCount);
        _inputCount.setColumns(10);

        JLabel lblLayersCount = new JLabel("Layers Count");
        lblLayersCount.setBounds(10, 130, 114, 30);
        frame.getContentPane().add(lblLayersCount);

        _layersCount = new JTextField();

        _layersCount.setText("2");
        _layersCount.setBounds(90, 135, 32, 19);
        frame.getContentPane().add(_layersCount);
        _layersCount.setColumns(10);




        _biasOnOff= new JPanel();
        _biasOnOff.setBounds(20,200,250,30);
        _biasOnOrOff = new ButtonGroup();

        JLabel label_1 = new JLabel("Bias");
        _biasOnOff.add(label_1);

        JRadioButton jRadioButton3 = new JRadioButton("On", true);
        jRadioButton3.setActionCommand("On");
        _biasOnOff.add(jRadioButton3);
        _biasOnOrOff.add(jRadioButton3);

        JRadioButton jRadioButton4 = new JRadioButton("Off", false);
        jRadioButton4.setActionCommand("Off");
        _biasOnOff.add(jRadioButton4);
        _biasOnOrOff.add(jRadioButton4);



        _biasOnOff.setBounds(0, 70, 180, 30);
        //_biasOnOff.setSize(300,30);

        _biasOnOff.setVisible(true);
        _biasOnOff.revalidate();
        //_biasOnOff.set
        frame.getContentPane().add(_biasOnOff);


        _layersCount.getDocument().addDocumentListener(new DocumentListener() {
            public void changedUpdate(DocumentEvent e) {
                changeLayersCount();
            }
            public void removeUpdate(DocumentEvent e) {
                changeLayersCount();
            }
            public void insertUpdate(DocumentEvent e) {
                changeLayersCount();
            }
        });


        _scrollPane = Box.createVerticalBox();
        //_scrollPane.setBounds(10,80,500,500);
        frame.getContentPane().add(_scrollPane);


        _jScrollPane = new JScrollPane(_scrollPane);
        _jScrollPane.setBounds(10,160,340,400);
        //_jScrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
        frame.getContentPane().add(_jScrollPane);



        _randomOrCustomJPanel= new JPanel();
        _randomOrCustomJPanel.setBounds(20,200,300,30);
        _randomOrCustomWeights = new ButtonGroup();

        JLabel lblWeights = new JLabel("Weig");
        _randomOrCustomJPanel.add(lblWeights);

        JRadioButton jRadioButton = new JRadioButton("Zero", true);
        jRadioButton.setActionCommand("Zero");
        _randomOrCustomJPanel.add(jRadioButton);
        _randomOrCustomWeights.add(jRadioButton);

        JRadioButton jRadioButton2 = new JRadioButton("Random", false);
        jRadioButton2.setActionCommand("Random");
        _randomOrCustomJPanel.add(jRadioButton2);
        _randomOrCustomWeights.add(jRadioButton2);



        _randomOrCustomJPanel.setBounds(0, 100, 180, 30);
        //_randomOrCustomJPanel.setSize(300,30);

        _randomOrCustomJPanel.setVisible(true);
        _randomOrCustomJPanel.revalidate();
        //_randomOrCustomJPanel.set
        frame.getContentPane().add(_randomOrCustomJPanel);



        _minTextField = new JTextField();
        _minTextField.setText("2");
        _minTextField.setBounds(183, 107, 50, 20);
        frame.getContentPane().add(_minTextField);

        _maxTextField = new JTextField();
        _maxTextField.setText("2");
        _maxTextField.setBounds(260, 107, 50, 20);
        frame.getContentPane().add(_maxTextField);

        JLabel _pause = new JLabel("-");
        _pause.setBounds(240, 107, 15, 20);
        frame.getContentPane().add(_pause);

        JLabel lblNeuronsInLayer = new JLabel("Neurons in kohonen layer number");
        lblNeuronsInLayer.setBounds(225, 45, 181, 15);
        //frame.getContentPane().add(lblNeuronsInLayer);

        JLabel lblActivationFunction = new JLabel("Activation function");
        lblActivationFunction.setBounds(550, 45, 158, 15);
        //frame.getContentPane().add(lblActivationFunction);

        JLabel lblLayerNumber = new JLabel("<html>Layer<br>number</html>");
        lblLayerNumber.setBounds(12, 45, 102, 30);

        JLabel lblInputs = new JLabel("Inputs");
        lblInputs.setBounds(430, 40, 100, 45);
        frame.getContentPane().add(lblInputs);

        _inputTextArea = new JTextArea();
        _inputTextArea.setSize(148, 228);
        _inputTextArea.setLocation(0, 0);
        frame.getContentPane().add(_inputTextArea);

        JScrollPane jScrollPane = new JScrollPane(_inputTextArea);
        jScrollPane.setBounds(380,80,150,490);
        frame.getContentPane().add(jScrollPane);

        JLabel lblOutputs = new JLabel("Outputs");
        lblOutputs.setBounds(590, 40, 100, 45);
        frame.getContentPane().add(lblOutputs);

        _outputTextArea = new JTextArea();
        frame.getContentPane().add(_outputTextArea);

        JScrollPane jScrollPane2 = new JScrollPane(_outputTextArea);
        jScrollPane2.setBounds(550,80,150,490);
        frame.getContentPane().add(jScrollPane2);

//        _scrollPane.setBounds(10,80,500,500);
//        _scrollPane.setHorizontalScrollBar(new JScrollBar(HORIZONTAL));
//        _scrollPane.setVerticalScrollBar(new JScrollBar(VERTICAL));
//
//        //_scrollPane.setWheelScrollingEnabled(true);
//        _scrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
//        _scrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
//        frame.getContentPane().add(_scrollPane);

        _countButton = new JButton();
        _countButton.setText("Count");
        _countButton.setBounds(650,5,100,30);

        _countButton.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent actionEvent) {
                try {
                    try {
                        count();
                    } catch (FileNotFoundException e) {
                        e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
                    } catch (IOException e) {
                        e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
                    }
                } catch (TooMuchInputLayersException e) {
                    e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
                } catch (InvalidDimensionsException e) {
                    e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
                }
            }

        });

        _btnChooseInputFile = new JButton("Choose input file");
        _btnChooseInputFile.setBounds(150, 5, 130, 30);

        _btnChooseOuputFile = new JButton("Choose output file");
        _btnChooseOuputFile.setBounds(285, 5, 140, 30);

        _btnChooseOuputFile.addMouseListener(new MouseAdapter() {
            @Override
            public void mouseClicked(MouseEvent e) {

                JFileChooser fc = new JFileChooser(".");
                int returnVal = fc.showOpenDialog(fc);
                if (returnVal == JFileChooser.APPROVE_OPTION) {
                    _outputFile = fc.getSelectedFile();
                }
                //txtFieldImportingFile.setText(fileChoosenToImport.getName());
            }
        });

        _btnChooseInputFile.addMouseListener(new MouseAdapter() {
            @Override
            public void mouseClicked(MouseEvent e) {

                JFileChooser fc = new JFileChooser(".");
                int returnVal = fc.showOpenDialog(fc);
                if (returnVal == JFileChooser.APPROVE_OPTION) {
                    _inputFile = fc.getSelectedFile();
                }
                //txtFieldImportingFile.setText(fileChoosenToImport.getName());
            }
        });

        frame.getContentPane().add(_btnChooseInputFile);
        frame.getContentPane().add(_btnChooseOuputFile);

        frame.getContentPane().add(_countButton);

        _alfa = new JTextField();
        _alfa.setText("2");
        _alfa.setBounds(40, 10, 50, 20);
        frame.getContentPane().add(_alfa);

        JLabel lblIterationCount = new JLabel("Iteration count");
        lblIterationCount.setBounds(160, 40, 114, 30);
        frame.getContentPane().add(lblIterationCount);

        _iterationCount = new JTextField();
        _iterationCount.setText("2");
        _iterationCount.setBounds(250, 45, 50, 20);
        frame.getContentPane().add(_iterationCount);

        JButton btnInitialize = new JButton();
        btnInitialize.addMouseListener(new MouseAdapter() {
            @Override
            public void mouseClicked(MouseEvent e) {
                initializeNetwork();

            }


        });
        btnInitialize.setText("Initialize");
        btnInitialize.setBounds(435, 5, 80, 30);
        frame.getContentPane().add(btnInitialize);
        JButton btnLearnGrossberg = new JButton();

        btnLearnGrossberg.addMouseListener(new MouseAdapter() {
            @Override
            public void mouseClicked(MouseEvent e) {
                try {
                    learnBp();
                } catch (InvalidDimensionsException e1) {
                    e1.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
                }
            }
        });
        btnLearnGrossberg.setText("Learn");
        btnLearnGrossberg.setBounds(525, 5, 120, 30);
        frame.getContentPane().add(btnLearnGrossberg);
        _activationFunctionType = new ButtonGroup();

        boolean checkActivationFunctionType = true;

        for (ActivationFunctionType aft : ActivationFunctionType.values()){
            if (aft.name().equals("HARDLIM")) continue;
            JRadioButton jRadioButtonInside = new JRadioButton(aft.name(), checkActivationFunctionType);
            jRadioButtonInside.setActionCommand(aft.name());
            //System.out.println(aft.name());
            //_activationPanel.add(jRadioButtonInside);
            _activationFunctionType.add(jRadioButtonInside);
            //add(jRadioButton);
            checkActivationFunctionType = false;
        }

        JLabel lblAlfa_1 = new JLabel("Alfa");
        lblAlfa_1.setBounds(10, 5, 104, 30);
        frame.getContentPane().add(lblAlfa_1);

        JLabel lblMomentum = new JLabel("Momentum");
        lblMomentum.setBounds(10, 40, 114, 30);
        frame.getContentPane().add(lblMomentum);

        _momentum = new JTextField();
        _momentum.setText("2");
        _momentum.setBounds(75, 45, 50, 20);
        frame.getContentPane().add(_momentum);

        JButton rms = new JButton();
        rms.addMouseListener(new MouseAdapter() {
            @Override
            public void mouseClicked(MouseEvent arg0) {
                _bpNetwork.printRmsError();
            }
        });
        rms.setText("Print RMS Error");
        rms.setBounds(710, 47, 130, 30);
        frame.getContentPane().add(rms);

        JButton weightPrinter = new JButton();
        weightPrinter.addMouseListener(new MouseAdapter() {
            @Override
            public void mouseClicked(MouseEvent e) {
                _bpNetwork.printWeights();
            }
        });
        weightPrinter.setText("Print weights");
        weightPrinter.setBounds(710, 80, 130, 30);
        frame.getContentPane().add(weightPrinter);

        JLabel lblKohonen = new JLabel("Neurons in Kohonen layer count");
        lblKohonen.setBounds(0, 190, 200, 45);
//        frame.getContentPane().add(lblKohonen);

        _neuronsInKohonenLayer = new JTextField();
        _neuronsInKohonenLayer.setText("2");
        _neuronsInKohonenLayer.setBounds(200, 202, 50, 20);
//        frame.getContentPane().add(_neuronsInKohonenLayer);



    }