AnchorPane_Background1
 
Code:

package javafxtemplate1;
//Recursion_BindContent_ListView1
//textProperty().addListener Listview Label
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.Label;
import javafx.scene.control.Separator;
import javafx.scene.control.ToolBar;
import javafx.scene.layout.FlowPane;
import javafx.scene.layout.HBox;
import javafx.scene.layout.Pane;
import javafx.scene.paint.Color;
import javafx.stage.Stage;
import java.lang.Boolean;
import javafx.scene.layout.AnchorPane;

/**
*
* @author Manas9
*/
public class JavaFXTemplate1 extends Application {
//ImageView imageView = new ImageView();
//Button clearBtn = new Button("Clear Image");
//Node imagenode;
Label label1 =new Label("L1");
Label label2 =new Label("L1");
Scene scene;
//Pane pane1 = new Pane();
FlowPane pane1 = new FlowPane();
HBox hb1 = new HBox(10); HBox hb2 = new HBox(10);
String str1; Color color1 ;//= new Color();
@Override
public void start(Stage primaryStage) throws Exception {
ToolBar toolBar1,toolBar2,toolBar3 ;
//,ap2;
boolean ok = true;
toolBar1 = new ToolBar(
new Button("New"),
new Button("Open"),
new Button("Save"),
new Separator(),
new Button("Clean"));
toolBar2 = new ToolBar(
new Button("Compile"),
new Button("Run"),
new Separator(),
new Button("Debug"),
new Button("Profile")
);
toolBar3 = new ToolBar( new Separator(),
new Button("Overflow"));

AnchorPane.setTopAnchor(toolBar1, 10.0);
AnchorPane.setLeftAnchor(toolBar3, 310.0);
//
AnchorPane.setBottomAnchor(toolBar2, 10.0);
//AnchorPane.setLeftAnchor(toolBar3, 300.0);
AnchorPane.setRightAnchor(toolBar2, 10.0);

AnchorPane ap3 =new AnchorPane();
ap3.setStyle("-fx-background-color: lightgray, green;"
+ "-fx-background-insets: 0, 4;"
+ "-fx-background-radius: 4, 2;");
//ap2 = new AnchorPane();
primaryStage.setTitle("Anchor Pane Examples");
//hb1.setPrefSize(200, 100);
//pane1.getChildren().addAll(toolBar1,toolBar3,toolBar2);
ap3.getChildren().addAll(toolBar1,toolBar3,toolBar2);
Scene scene = new Scene(ap3,800,600);

primaryStage.setScene(scene);
primaryStage.show();
}

//


public static void main(String[] args) {
launch(args);
}
//


}

 

runtime displays