Call up a new screen using a button (Scene Builder, JavaFX)

-3

I have created two screens, one main and one that I intend to call using a button, what would be the appropriate method to call this secondary screen?

    
asked by anonymous 21.11.2018 / 18:19

1 answer

0
findViewById(R.id.botao).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent variavel = new Intent(context, classeSegundaTela.class);
                startActivity(variavel);
            }
        });
    
21.11.2018 / 18:25