Source Code : Connect to CSS Style Sheet in same Package

Java Is Open Source Programming Language You Can Download From Java and Java Libraries From http://www.oracle.com. Click Here to download
We provide this code related to title for you to solve your developing problem easily. Libraries which is import in this program you can download from http://www.oracle.com. Click Here or search from google with Libraries Name you get jar file related it

Connect to CSS Style Sheet in same Package

 


import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.layout.VBox;
import javafx.stage.Stage;

public class Main extends Application {

    @Override
    public void start(Stage stage) {
      VBox box = new VBox();
        final Scene scene = new Scene(box,300, 250);
        scene.setFill(null);
        scene.getStylesheets().add(this.getClass().getResource("Styles.css").toExternalForm());
        stage.setScene(scene);
        stage.show();
    }

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

   
  

Thank with us