Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8113424

We can't change background or border of TitledPane

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not an Issue
    • Icon: P3 P3
    • fx2.0
    • fx2.0
    • javafx
    • b30
      windows 7

      To reproduce run following code




      import javafx.application.Application;
      import javafx.scene.Parent;
      import javafx.scene.Scene;
      import javafx.scene.control.Label;
      import javafx.scene.control.TitledPane;
      import javafx.scene.layout.VBox;
      import javafx.scene.text.Text;
      import javafx.stage.Stage;

      public class TitledPaneBorderBackground extends Application {

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

          private Parent getContent() {
              VBox list = new VBox(10);

              TitledPane outerPane=new TitledPane();
              outerPane.setTitle(new Label("OuterPane label"));
              outerPane.setContent(new Text("Content Content"));
              outerPane.setStyle("-fx-background-color: green; -fx-border-color:red;");
              list.getChildren().add(outerPane);
              return list;
          }

          public void start(Stage stage) {
              stage.setX(100);
              stage.setY(100);
              stage.setWidth(300);
              stage.setHeight(300);
              Scene scene = new Scene(getContent());
              stage.setScene(scene);
              stage.setVisible(true);
          }
      }

            kwwong Kinsley Wong (Inactive)
            anazarov Andrey Nazarov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: