3 Replies Latest reply: Oct 25, 2012 10:04 AM by David Grieve RSS

    css problem

    kapac
      Hi;
      i try to study the javafx CSS reference guide red rectangle example and i made the following code with the copied test.css in src folder
      public class Mymedia8 extends Application {
          
          @Override
        public void start(Stage primaryStage) {
            Scene scene = new Scene(new Group());
      scene.getStylesheets().add("test.css");
      Rectangle rect = new Rectangle(100,100);
      rect.setLayoutX(50);
      rect.setLayoutY(50);
      rect.getStyleClass().add("my-rect");
      ((Group)scene.getRoot()).getChildren().add(rect);  
       primaryStage.setScene(scene);
          primaryStage.show();
        }
          public static void main(String[] args) {
              launch(args);
          }
      } 
      and i get the error test.css not found i don't understand;please help
      regards