EDIT: Nevermind after 2 days of searching for an answer realized i was using () brackets where i needed to use {}
Here's the java code
java Code:
package mainStage;import javafx.application.Application;import javafx.geometry.Insets;import javafx.scene.Scene;import javafx.scene.control.Button;import javafx.scene.layout.GridPane;import javafx.stage.Stage;public class MainStage
extends Application
{ Stage window
; public static void main
(String[] args
) { launch
(args
); } @Override
public void start
(Stage primaryStage
) throws Exception { window
= primaryStage
; Button clicker
= new Button("Click Me!"); clicker.
setOnAction(e
-> System.
out.
println("Click clickitty")); GridPane layout
= new GridPane
(); layout.
setPadding(new Insets(10,
10,
10,
10)); layout.
getChildren().
add(clicker
); layout.
setId("layout"); //layout.setStyle("-fx-background-color: #383838;"); Scene scene
= new Scene
(layout,
300,
200); scene.
getStylesheets().
add("mainStage/Stylesheet.css"); window.
setScene(scene
); window.
show(); }}
Here is my css
css Code:
.root{
-fx-background-color: #383838;
}