Eclipse doesn't show any problem or a red line, but the app still doesn't run, what should I do?
here is the code: package application; import javafx.application.Application; import javafx.stage.Stage; import javafx.scene.Group; import javafx.scene.Scene; import javafx.scene.control.Button; import javafx.scene.control.Label; import javafx.scene.effect.DropShadow; import javafx.scene.effect.Reflection; import javafx.scene.image.Image; import javafx.scene.image.ImageView; import javafx.scene.input.MouseEvent; import javafx.scene.paint.Color; import javafx.scene.shape.Line; import javafx.scene.shape.Rectangle; import javafx.scene.text.Font; import javafx.scene.text.Text; public class Main extends Application { public void start(Stage primaryStage) { Group root= new Group(); Scene scene= new Scene(root,600,600,Color.DARKGRAY); Line line=new Line(); line.setStartX(125); line.setStartY(103); line.setEndX(400); line.setEndY(206); root.getChildren().add(line); Rectangle rec= new Rectangle(); rec.setX(400); rec.setY(400); rec.setWidth(100); rec.setHeight(100); rec.setFill(Color.YELLOW); rec.setArcHeight(50); rec.setArcWidth(100); root.getChildren().add(rec); Image img= new Image(getClass().getResourceAsStream("bu1.png")); Button btn= new Button(); btn.setGraphic(new ImageView(img)); btn.setLayoutX(250); btn.setLayoutY(400); Label lbl=new Label("Rotation angle: "); lbl.setLayoutX(250); lbl.setLayoutY(375); root.getChildren().addAll(btn,lbl); DropShadow shadow= new DropShadow(); btn.addEventHandler(MouseEvent.MOUSE_ENTERED, (MouseEvent e)->{ btn.setEffect(shadow); }); btn.addEventHandler(MouseEvent.MOUSE_EXITED, (MouseEvent e)->{ btn.setEffect(null); }); Text txt=new Text(120,150,"Welcome to JavaFX"); Font fnt=new Font("century gothic",30); txt.setFont(fnt); txt.setFill(Color.YELLOW); txt.setRotate(20); root.getChildren().add(txt);