package fx.com;
import javafx.application.Application;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.scene.image.Image;
import javafx.scene.layout.AnchorPane;
import javafx.scene.layout.BorderPane;
import javafx.stage.Stage;
import java.net.URL;
public class Main extends Application {
public static void main(String[] args) {
Application.launch(Main.class,args);
}
@Override
public void start(Stage primaryStage) throws Exception {
String _EE6AA7 ="-fx-background-color: #EE6AA7;" +
"-fx-pref-width: 100;" +
"-fx-pref-height: 100";
AnchorPane a1 = new AnchorPane();
a1.setStyle(_EE6AA7);
String _98FB98 ="-fx-background-color: #98FB98;" +
"-fx-pref-width: 100;" +
"-fx-pref-height: 100";
AnchorPane a2 = new AnchorPane();
a2.setStyle(_98FB98);
String A0522D ="-fx-background-color: #A0522D;" +
"-fx-pref-width: 100;" +
"-fx-pref-height: 100";
AnchorPane a3 = new AnchorPane();
a3.setStyle(A0522D);
String _1E90FF ="-fx-background-color: #1E90FF;" +
"-fx-pref-width: 100;" +
"-fx-pref-height: 100";
AnchorPane a4 = new AnchorPane();
a4.setStyle(_1E90FF);
String EEEE00 ="-fx-background-color: #EEEE00;" +
"-fx-pref-width: 100;" +
"-fx-pref-height: 100";
AnchorPane a5 = new AnchorPane();
a5.setStyle(EEEE00);
Parent bor = new BorderPane();
((BorderPane) bor).setTop(a1);
((BorderPane) bor).setBottom(a2);
((BorderPane) bor).setLeft(a3);
((BorderPane) bor).setRight(a4);
((BorderPane) bor).setCenter(a5);
bor.setStyle("-fx-background-color: #B23AEE");
Scene scene = new Scene(bor);
primaryStage.setScene(scene);
primaryStage.setWidth(800);
primaryStage.setHeight(800);
primaryStage.setTitle("麻将布局");
primaryStage.getIcons().add(new Image("http://www.haotuo.net.cn/Resources/cq/qunlogo.png"));
primaryStage.show();
}
}