import javafx.application.*;
import javafx.scene.*;
import javafx.scene.text.*;
import javafx.stage.*;
 
public class NewClass extends Application {
 
    @Override
    public void start(Stage s) {
        Group g = new Group();
 
        Text text = new Text("Loli"); // 設定文字內容
        text.setX(100); // 設定文字 X 軸位置
        text.setY(50); // 設定文字 Y 軸位置
        text.setRotate(-45); // 旋轉 -45 度
        g.getChildren().add(text);
 
        s.setTitle("Hello World"); // 設定標題
        s.setWidth(250); // 設定視窗的寬
        s.setHeight(200); // 設定視窗的高
        s.setScene(new Scene(g));
        s.show(); // 顯示視窗
    }
 
    public static void main(String[] args) {
        launch(args);
    }
}
 
arrow
arrow
    全站熱搜

    黃彥霖 發表在 痞客邦 留言(0) 人氣()