Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)
Paste
Pasted as Java by ttt ( 8 years ago )
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.layout.Pane;
import javafx.scene.paint.Color;
import javafx.scene.shape.Circle;
import javafx.scene.shape.Line;
import javafx.scene.shape.Rectangle;
import javafx.scene.text.Text;
import javafx.stage.Stage;
public class Main extends Application {
@Override
public void start(Stage primaryStage) {
Pane p = new Pane();
Rectangle r = new Rectangle(40, 20, 50, 50);
r.setFill(Color.CRIMSON);
Circle c = new Circle(100, 80, 30);
c.setFill(Color.ANTIQUEWHITE);
c.setStroke(Color.DARKGOLDENROD);
Line l = new Line(150, 0, 100, 50);
Text t = new Text(150, 150, "Hello");
p.getChildren().add(r);
p.getChildren().add(c);
p.getChildren().add(l);
p.getChildren().add(t);
Scene s = new Scene(p, 200, 200);
primaryStage.setScene(s);
primaryStage.show();
primaryStage.setTitle("Shapes ");
primaryStage.setAlwaysOnTop(true);
}
public static void main(String[] args) {
launch(args);
}
}
Revise this Paste
Children: 94362