Skip to content

Instantly share code, notes, and snippets.

@KingC100
Last active March 26, 2021 09:41
Show Gist options
  • Save KingC100/8040948 to your computer and use it in GitHub Desktop.
Save KingC100/8040948 to your computer and use it in GitHub Desktop.
JavaFX  background-color
public class FXErycton extends Application {
@Override
public void start(Stage stage) throws Exception {
Parent root = FXMLLoader.load(getClass().getResource("FXErycton.fxml"));
root.setStyle("-fx-background-color: #F0591E;");
Scene scene = new Scene(root);
stage.setTitle("FXErcycton v1.0.0");
stage.setScene(scene);
stage.show();
}
@ryabos
Copy link

ryabos commented Jul 20, 2018

@hydroid7 you can also pass null args instead of CornerRadii and Insets, I think it's easier to read

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment