Custom Search
o7planning
All Tutorials Java Maven Gradle Servlet/Jsp Spring Struts2 Hibernate Java Web Service JavaFX SWT Oracle ADF Table Of Content
Android Python Swift C#
C/C++ Ruby Batch Database Report Client NodeJS Bootstrap OS Git SAP Others
1- JavaFX Group
JavaFX Group Tutorial 2- JavaFx Group example
3- JavaFx Group and Effects example
JavaFX Programming Tutorials
View more Tutorials:
Install e(fx)clipse into Eclipse (JavaFX Tooling)
Install JavaFX Scene Builder into Eclipse
JavaFX Programming Tutorials
JavaFX Tutorial for Beginners - Hello JavaFX
JavaFX FlowPane Layout Tutorial
JavaFX TilePane Layout Tutorial
1- JavaFX Group
JavaFX HBox, VBox Layout Tutorial
2- JavaFx Group example
3- JavaFx Group and Effects example JavaFX BorderPane Layout Tutorial
JavaFX AnchorPane Layout Tutorial
JavaFX GridPane Layout Tutorial
1- JavaFX Group JavaFX StackPane Layout Tutorial
JavaFX TitledPane Tutorial
JavaFX Group is a container, it is a component not applying the Layout for its subcomponents. All subcomponents are in position of
0,0. The Group is used to group some controls to do a certain task. For example, you can group 2 Radio male and female into a JavaFX ScrollPane Tutorial
gender group. JavaFX Accordion Tutorial
JavaFX ListView Tutorial
JavaFX Group Tutorial
JavaFX ComboBox Tutorial
JavaFX WebView and WebEngine Tutorial
JavaFX HTMLEditor Tutorial
JavaFX TableView Tutorial
JavaFX TreeView Tutorial
JavaFX TreeTableView Tutorial
JavaFX Menu Tutorial
JavaFX ContextMenu Tutorial
“
JavaFX Image and ImageView Tutorial
JavaFX Label Tutorial
See also JavaFX RadioButton: JavaFX Hyperlink Tutorial
JavaFX RadioButton Tutorial JavaFX Button Tutorial
JavaFX ToggleButton Tutorial
JavaFX RadioButton Tutorial
If you need some layout to the children inside the Group, nest them inside layout components and add the layout components to JavaFX MenuButton and SplitMenuButton
the Group Tutorial
JavaFX TextField Tutorial
1 Group group = new Group(); ? JavaFX PasswordField Tutorial
2
JavaFX TextArea Tutorial
3 Button button1 = new Button("Button 1");
4 Button button2 = new Button("Button 2"); JavaFX Slider Tutorial
5 JavaFX Spinner Tutorial
6 // Add to Group
JavaFX ProgressBar and ProgressIndicator
7 group.getChildren().addAll(button1, button2);
Tutorial
JavaFX ChoiceBox Tutorial
2- JavaFx Group example JavaFX Tooltip Tutorial
JavaFX DatePicker Tutorial
The Group not applying the Layout for its subcomponents. All subcomponents are in position of 0,0. JavaFX ColorPicker Tutorial
JavaFX FileChooser and DirectoryChooser
Tutorial
Opening a new Window in JavaFX
JavaFX Alert Dialogs Tutorial
JavaFX TextInputDialog Tutorial
JavaFX ChoiceDialog Tutorial
JavaFX PieChart Tutorial
JavaFX AreaChart and StackedAreaChart
Tutorial
JavaFX BarChart and StackedBarChart
GroupDemo.java Tutorial
JavaFX Line Tutorial
1 package org.o7planning.javafx.group; ?
2 JavaFX Rectangle and Ellipse Tutorial
3 import javafx.application.Application; JavaFX Effects Tutorial
4 import javafx.scene.Group;
JavaFX Transformations Tutorial
5 import javafx.scene.Scene;
6 import javafx.scene.control.Button;
7 import javafx.scene.text.Font;
8 import javafx.scene.text.Text;
9 import javafx.stage.Stage; Newest Documents
10
11 public class GroupDemo extends Application {
12 Bootstrap Sizing Utilities Tutorial
13 @Override Bootstrap Visibility Utilities Tutorial
14 public void start(Stage primaryStage) throws Exception {
Bootstrap Text Utilities Tutorial
15
16 Button button1 = new Button("This is a long button"); Bootstrap Display Utilities Tutorial
17 button1.setPrefSize(180, 80); Bootstrap Embed Utilities Tutorial
18 Bootstrap Position Utilities Tutorial
19 Button button2 = new Button("Short button");
20 Bootstrap Border Utilities Tutorial
21 Text text = new Text("Text"); Bootstrap Color Utilities Tutorial
22 text.setFont(new Font("Arial",20)); Bootstrap Flex Utilities Tutorial
23 text.setX(200);
24 text.setY(100); Installing Mac OS X Virtual Machine on
25 VirtualBox
26 Group root = new Group();
27
28
29 root.getChildren().addAll(button1, button2,text);
30
31 Scene scene = new Scene(root, 250, 100);
32
33 primaryStage.setTitle("JavaFX Group (o7planning.org)");
34 primaryStage.setScene(scene);
35 primaryStage.show();
36 }
37
38 public static void main(String[] args) {
39 Application.launch(args);
40 }
41
42 }
3- JavaFx Group and Effects example
The example below, add some controls into a Group and apply motion blur effect for the Group, it will take effect with all
components within the Group.
GroupEffectDemo.java
1 package org.o7planning.javafx.group; ?
2
3 import javafx.application.Application;
4 import javafx.scene.Group;
5 import javafx.scene.Scene;
6 import javafx.scene.control.Button;
7 import javafx.scene.effect.MotionBlur;
8 import javafx.scene.paint.Color;
9 import javafx.scene.shape.Rectangle;
10 import javafx.scene.text.Font;
11 import javafx.scene.text.FontWeight;
12 import javafx.scene.text.Text;
13 import javafx.stage.Stage;
14
15 public class GroupEffectDemo extends Application {
16
17 @Override
18 public void start(Stage primaryStage) throws Exception {
19
20 Group root = new Group();
21
22 Rectangle rectangle = new Rectangle();
23 rectangle.setX(10);
24 rectangle.setY(30);
25 rectangle.setWidth(160);
26 rectangle.setHeight(80);
27 rectangle.setFill(Color.DARKBLUE);
28
29 Text text = new Text();
30 text.setText("Motion Blur!");
31 text.setFill(Color.RED);
32 text.setFont(Font.font("null", FontWeight.BOLD, 36));
33 text.setX(25);
34 text.setY(65);
35
36 Button button = new Button("My Button");
37
38 root.setCache(true);
39
40 // Create a MotionBlur effect
41 MotionBlur motionBlur = new MotionBlur();
42
43 // Sét effect for the Group.
44 root.setEffect(motionBlur);
45 // Translate X axis 50 pixel
46 root.setTranslateX(50);
47
48 // All components to Group
49 root.getChildren().addAll(rectangle, button, text);
50
51 Scene scene = new Scene(root, 250, 100);
52
53 primaryStage.setTitle("JavaFX Group Demo (o7planning.org)");
54 primaryStage.setScene(scene);
55 primaryStage.show();
56 }
57
58 public static void main(String[] args) {
59 Application.launch(args);
60 }
61
62 }
‘
See Also JavaFX Effects:
JavaFX Effects Tutorial
View more Tutorials:
JavaFX Programming Tutorials
o7planning.org