Question: how can i fix this error: The method setRight(Node) in the type BorderPane is not applicable for the arguments (Button) D Main.java X 1 package
how can i fix this
error:
The method setRight(Node) in the type BorderPane is not applicable for the arguments (Button)

D Main.java X 1 package application; 2 import java.awt.Button; 3 import javafx.application. Application; 4 import javafx. stage. Stage; 5 import javafx.scene. Scene; 6 import javafx.scene.layout.BorderPane; 7 8 9 public class Main extends Application { 100 @Override A11 public void start(Stage primaryStage) { 12 try { 13 BorderPane root = new BorderPane(); 14 15 Button button1 = new Button("right"); 16 root.setRight(button1); 17 18 19 Scene scene = new Scene (root,400,400); 20 scene.getStylesheets() .add(getClass().getResource("application.css").toExternalForm()); 21 22 23 primaryStage.setScene (scene); 24 primaryStage.show(); 25 } catch (Exception e) { 26 e.printStackTrace(); 27 } 28 } 29 300 public static void main(String[] args) { 31 Launchlargs)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
