Datasets:

ArXiv:
License:
File size: 3,053 Bytes
c574d3a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
package rd222dv_assign2;

import javafx.application.Application;
import javafx.geometry.Pos;
import javafx.scene.Scene;
import javafx.scene.layout.HBox;
import javafx.scene.layout.VBox;
import javafx.scene.text.Font;
import javafx.scene.text.FontWeight;
import javafx.scene.text.Text;
import javafx.stage.Stage;

public class OneTwoThree extends Application {
	public void start(Stage primaryStage) {
		
		//three Hboxes with texts and nice background colors, 
		HBox hbox1 = new HBox();
	    hbox1.setStyle("-fx-background-color: #b0e0e6;");
	    hbox1.setPrefSize(700, 100);
	    Text text1 = new Text("One");
	    text1.setFont(Font.font("Sans Serif", FontWeight.BOLD, 42));
	    hbox1.getChildren().add(text1);
		
	    HBox hbox2 = new HBox();
	    hbox2.setStyle("-fx-background-color: #dda0dd;");
	    hbox2.setPrefSize(700, 100);
	    Text text2 = new Text("Two");
	    hbox2.setAlignment(Pos.CENTER);
	    text2.setFont(Font.font("Sans Serif", FontWeight.BOLD, 42));
	    hbox2.getChildren().add(text2);
	    
	    HBox hbox3 = new HBox();
	    hbox3.setStyle("-fx-background-color: #ffb6c1;");
	    hbox3.setPrefSize(700, 100);
	    Text text3 = new Text("Three");
	    hbox3.setAlignment(Pos.BOTTOM_RIGHT);
	    text3.setFont(Font.font("Sans Serif", FontWeight.BOLD, 42));
	    hbox3.getChildren().add(text3);
	    
	    //packing the Hboxes in a VBox (vertical Box)
	    VBox vbox = new VBox();
	    vbox.getChildren().addAll(hbox1, hbox2, hbox3);
	    Scene scene = new Scene(vbox, 702, 300); //creating the scene
	    
		 primaryStage.setTitle("OneTwoThree!"); 
		 primaryStage.setScene(scene);
		 primaryStage.show();
	}
		  
					
	public static void main(String[] args) {
		launch(args);
		}
    }
/*Pane root = new Pane();

VBox vbox = new VBox();



Rectangle r1 = new Rectangle(700, 100);

r1.setFill(Color.YELLOW);

Text text1 = new Text("One");

   

Rectangle r2 = new Rectangle(700, 100);

r2.setFill(Color.BLUE);

Text text2 = new Text("Two");



Rectangle r3 = new Rectangle(700, 100);

r3.setFill(Color.GREEN);

Text text3 = new Text("Three");

   

vbox.getChildren().addAll(r1, text1, r2, text2, r3, text3);

root.getChildren().add(vbox);

Scene scene = new Scene(root, 702, 315);*/
   
   /* stackPane.getChildren().addAll(r1, text1, r2, text2, r3, text3);

    stackPane1.getChildren().addAll(r1, text1);

    stackPane2.getChildren().addAll(r2, text2);

    stackPane3.getChildren().addAll(r3, text3);

    root.getChildren().add(stackPane);*/
    

 /*VBox vbox1 = new VBox();

 Text text1 = new Text("One");

 vbox1.getChildren().add(text1);



 

 VBox vbox2 = new VBox();

 Text text2 = new Text("Two");

 vbox2.getChildren().add(text2);



 

 VBox vbox3 = new VBox();

 Text text3 = new Text("Three");

 vbox3.getChildren().add(text3);

 

 VBox vbox=new VBox();

 vbox.getChildren().addAll(vbox1, vbox2, vbox3);

 Scene scene = new Scene(vbox, 700, 100);



 primaryStage.setTitle("OneTwoThree!");

 primaryStage.setScene(scene);

 primaryStage.show();*/