public SortProgram(String s) {
        super(s);
        setBounds(500,100,350,450);
        setLayout(null);

        JLabel laInput = new JLabel("Path to input data file:");
        laInput.setBounds(105,10,200,15);
        add(laInput);

        final JTextField tfInput = new JTextField("");
        tfInput.setBounds(55, 35, 220, 25);
        tfInput.setFont(new Font("Courier", 0, 12));
        add(tfInput);

        JRadioButton rbBubble = new JRadioButton("Bubble Sort");
        rbBubble.setBounds(65, 80, 150, 15);
        add(rbBubble);
        rbBubble.setSelected(true);

        rbBubble.addActionListener(new ActionListener(){
            public void actionPerformed(ActionEvent ae) {
                typeOfSort = 1;
            }
        });

        JRadioButton rbInsertion = new JRadioButton("Insertion Sort");
        rbInsertion.setBounds(65, 100, 150, 15);
        add(rbInsertion);

        rbInsertion.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent ae) {
                typeOfSort = 2;
            }
        });

        JRadioButton rbBogo = new JRadioButton("Bogo Sort");
        rbBogo.setBounds(65, 120, 150, 15);
        add(rbBogo);

        rbBogo.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent ae) {
                typeOfSort = 3;
            }
        });

        ButtonGroup bgFrom = new ButtonGroup();
        bgFrom.add(rbBubble);
        bgFrom.add(rbInsertion);
        bgFrom.add(rbBogo);


        JLabel laOutput= new JLabel("Path to output data file:");
        laOutput.setBounds(105,150,200,15);
        add(laOutput);

        final JTextField tfOutput = new JTextField("");
        tfOutput.setBounds(55, 175, 220, 25);
        tfOutput.setFont(new Font("Courier", 0, 12));
        add(tfOutput);

        final JTextArea taResult = new JTextArea("");
        taResult.setBounds(20, 280, 295, 100);
        // Color bg = getBackground();
        taResult.setLineWrap(true);
        //  taResult.setBackground(bg);
        taResult.setEditable(false);
        add(taResult);

        JButton btSort = new JButton ("Sort");
        btSort.setBounds(112,230,105,30);
        add(btSort);

        btSort.addActionListener(new ActionListener()
        { public void actionPerformed(ActionEvent ae) {
                ArrayList aList = new ArrayList<Integer>();
                Scanner sc = null;
                String inputFile = new String(tfInput.getText().replace("\\", "\\\\"));
                String outputFile = new String(tfOutput.getText().replace("\\", "\\\\"));

                if (inputFile.isEmpty() || outputFile.isEmpty()) {
                    taResult.setText("Enter the path to data file");
                } else {
                    try {
                        sc = new Scanner(new File(inputFile));
                        while (sc.hasNextInt()) {
                            aList.add(sc.nextInt());
                        }
                        switch (typeOfSort)
                        {
                            case 1:
                                BubbleSort bubble = new BubbleSort();
                                bubble.sort(aList);
                                taResult.setText("");
                                taResult.append("The number of comparisons: "+bubble.getCompareCount()+'\n');
                                taResult.append("The number of insertions: "+bubble.getInsertCount()+'\n');
                                taResult.append("The time of sorting: "+bubble.getTimeOfSorting()+" ms"+'\n');
                                break;
                            case 2:
                                InsertionSort insert = new InsertionSort();
                                insert.sort(aList);
                                taResult.setText("");
                                taResult.append("The number of comparisons: "+ insert.getCompareCount()+'\n');
                                taResult.append("The number of insertions: "+ insert.getInsertCount()+'\n');
                                taResult.append("The time of sorting: "+ insert.getTimeOfSorting()+" ms"+'\n');
                                break;
                            case 3:
                                BogoSort bogo = new BogoSort();
                                bogo.sort(aList);
                                taResult.setText("");
                                taResult.append("The number of comparisons: "+ bogo.getCompareCount()+'\n');
                                taResult.append("The number of insertions: "+ bogo.getInsertCount()+'\n');
                                taResult.append("The time of sorting: "+ bogo.getTimeOfSorting()+" ms"+'\n');
                                break;
                        }
                        try {
                            PrintWriter pw = new PrintWriter(new File(outputFile));
                            for (int i = 0; i < aList.size(); i++) {
                                pw.print(aList.get(i)+" ");
                            }
                            pw.flush();
                        } catch (FileNotFoundException e) {
                            taResult.setText(e.getMessage());
                        }
                    } catch (FileNotFoundException e) {
                        taResult.setText(e.getMessage());
                    }
                }

            }
        });
    }