public void main() {
        Stage stage=new Stage();

        ToolBar toolBar=new ToolBar();

        Button btn1=new Button("Danes");
        btn1.setFocusTraversable(false);
        Button btn2=new Button("Jutri");
        btn2.setFocusTraversable(false);
        Button btn3=new Button("Pojutrišnjem");
        btn3.setFocusTraversable(false);

        Region spacer1=new Region();
        spacer1.setPrefWidth(30);

        Region spacer2=new Region();
        spacer2.setPrefWidth(60);

        Region spacer3=new Region();
        spacer3.setPrefWidth(30);

        Button settings=new Button("Nastavitve");
        settings.setFocusTraversable(false);

        HBox h1=new HBox(5);
        h1.getStyleClass().addAll("segmented-button-bar");
        h1.getChildren().addAll(btn1, btn2, btn3);

        toolBar.getItems().addAll(spacer1, h1, spacer2, settings);


        try {
            BufferedReader in=new BufferedReader(new InputStreamReader(new FileInputStream(Main.path+"filter.txt"), "UTF-8"));
            String ln; String out="";
            while ((ln=in.readLine())!=null) out+=ln;

            filter=out;
        } catch (Exception e) {}

        final TextArea textArea=new TextArea(Functions.text(0, filter));
        textArea.setWrapText(true);
        textArea.setEditable(false);
        textArea.setStyle("-fx-focus-color: transparent;");
        textArea.setFocusTraversable(false);



        btn1.setOnAction(new EventHandler<ActionEvent>() {
            @Override
            public void handle(ActionEvent actionEvent) {
                textArea.setText(Functions.text(0, filter));
                view=0;
            }
        });

        btn2.setOnAction(new EventHandler<ActionEvent>() {
            @Override
            public void handle(ActionEvent actionEvent) {
                textArea.setText(Functions.text(1, filter));
                view=1;
            }
        });

        btn3.setOnAction(new EventHandler<ActionEvent>() {
            @Override
            public void handle(ActionEvent actionEvent) {
                textArea.setText(Functions.text(2, filter));
                view=2;
            }
        });

        settings.setOnAction(new EventHandler<ActionEvent>() {
            @Override
            public void handle(ActionEvent actionEvent) {
                final Stage stage1=new Stage();

                TextArea about=new TextArea();
                about.setWrapText(true);
                about.setEditable(false);
                about.setStyle("-fx-focus-color: transparent;");
                about.setFocusTraversable(false);
                about.setText("Avtor: Vid Drobnič, Gimnazija Vič; vse pravice pridržane.\n\nVerzija: " + Main.currentVersion);
                about.setMaxHeight(100);


                final TextField filter=new TextField("Filter:");
                filter.setEditable(false);
                filter.setStyle("-fx-focus-color: transparent;");
                filter.setFocusTraversable(false);
                filter.setMaxSize(55, 50);

                final TextField input=new TextField();
                input.setEditable(true);

                String filterString="";

                try {
                    BufferedReader in=new BufferedReader(new InputStreamReader(new FileInputStream(Main.path+"filter.txt"), "UTF-8"));
                    String ln; String out="";
                    while ((ln=in.readLine())!=null) out+=ln;

                    filterString=out;
                } catch (Exception e) {}

                input.setText(filterString);


                HBox h1=new HBox(10);
                h1.getChildren().addAll(filter, input);


                Button submit=new Button("Nastavi");
                submit.setOnAction(new EventHandler<ActionEvent>() {
                    @Override
                    public void handle(ActionEvent actionEvent) {
                        try {
                            PrintWriter out=new PrintWriter(Main.path+"filter.txt");
                            out.print(input.getText());
                            out.close();
                        } catch (Exception e) {}

                        Gui.filter=input.getText().replaceAll(" ", "");
                        textArea.setText(Functions.text(view, Gui.filter));
                        stage1.close();
                    }
                });


                HBox h2=new HBox();
                h2.setAlignment(Pos.CENTER);
                h2.getChildren().addAll(submit);

                VBox root=new VBox(15);
                root.setPadding(new Insets(25, 25, 25, 25));
                root.getChildren().addAll(about, h1, h2);

                Scene scene=new Scene(root, 500, 250);

                stage1.setScene(scene);
                stage1.setTitle("Preproste Suplence");
                stage1.getIcons().add(new Image(com.DzinVision.preprosteSuplence.main.Main.class.getResourceAsStream("icon.png")));
                stage1.show();

            }
        });


        BorderPane root=new BorderPane();
        root.setTop(toolBar);
        root.setCenter(textArea);

        Scene scene=new Scene(root, 600, 800);

        stage.setScene(scene);
        stage.setTitle("Preproste Suplence");
        stage.getIcons().add(new Image(com.DzinVision.preprosteSuplence.main.Main.class.getResourceAsStream("icon.png")));
        stage.setOnCloseRequest(new EventHandler<WindowEvent>() {
            @Override
            public void handle(WindowEvent windowEvent) {
                System.exit(0);
            }
        });
        stage.showAndWait();
    }