[Java] invalid flag error in cmd when trying to compile program via /r/learnprogramming

[Java] invalid flag error in cmd when trying to compile program

import javafx.application.Application; import javafx.geometry.Point2D; import javafx.scene.Scene; import javafx.scene.layout.Pane; import javafx.scene.text.Font; import javafx.scene.text.FontWeight; import javafx.scene.text.Text; import javafx.stage.Stage; public class Exercise_05 extends Application{ @Override public void start(Stage primaryStage) { Pane pane = new Pane(); String[] java = "Welcome to Java".split(""); Font font = Font.font("Times New Roman", FontWeight.EXTRA_BOLD, 30); Point2D center = new Point2D(200, 200); double radius = 100; double angle = 0; double rotate = 90; for (int i = 0; i < java.length; i++, angle += 22, rotate += 22) { double x = center.getX() + radius * Math.cos(Math.toRadians(angle)); double y = center.getY() + radius * Math.sin(Math.toRadians(angle)); Text text = new Text(x, y,java[i]); text.setRotate(rotate); text.setFont(font); pane.getChildren().add(text); } Scene scene = new Scene(pane, 400, 400); primaryStage.setTitle("Welcome to Java"); primaryStage.setScene(scene); primaryStage.show(); } public static void main(String[] args) { Application.launch(args); } } 

Submitted July 16, 2017 at 11:18AM by QxUAS_op3-3
via reddit http://ift.tt/2vreqNU


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s