-fx-text-fill: white; : CSS « JavaFX « Java

Home
Java
1.2D Graphics GUI
2.3D
3.Advanced Graphics
4.Ant
5.Apache Common
6.Chart
7.Class
8.Collections Data Structure
9.Data Type
10.Database SQL JDBC
11.Design Pattern
12.Development Class
13.EJB3
14.Email
15.Event
16.File Input Output
17.Game
18.Generics
19.GWT
20.Hibernate
21.I18N
22.J2EE
23.J2ME
24.JavaFX
25.JDK 6
26.JDK 7
27.JNDI LDAP
28.JPA
29.JSP
30.JSTL
31.Language Basics
32.Network Protocol
33.PDF RTF
34.Reflection
35.Regular Expressions
36.Scripting
37.Security
38.Servlets
39.Spring
40.Swing Components
41.Swing JFC
42.SWT JFace Eclipse
43.Threads
44.Tiny Application
45.Velocity
46.Web Services SOA
47.XML
Java » JavaFX » CSS 




-fx-text-fill: white;
 
import javafx.application.Application;
import javafx.scene.Group;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.stage.Stage;

public class Main extends Application {

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

  @Override
  public void start(Stage primaryStage) {
    Group group = new Group();

    Button button = new Button("Button");    
    
    button.setStyle("-fx-text-fill: white;");
    
    group.getChildren().add(button);
    
    Scene scene = new Scene(group, 300200);
    primaryStage.setScene(scene);
    primaryStage.show();
  }
}

   
  














Related examples in the same category
1.Using CSS to style the border
2.Connect to CSS Style Sheet in same Package
3.Connect to CSS Style Sheet in another Package
4.Set CSS style
5.-fx-stroke: green;
6.-fx-stroke-width: 5;
7.-fx-stroke-dash-array: 12 2 4 2;
8.-fx-stroke-dash-offset: 6;
9.-fx-stroke-line-cap: butt;
10.-fx-background-color: transparent;
11.-fx-border-color: white;
12.-fx-background-radius: 30;
13.-fx-border-radius: 30;
14.-fx-font-weight: bold;
15.-fx-font-size: 14px;
16.-fx-padding: 10 20 10 20;
17.Chart -fx-background-color: rgba(0,168,355,0.05);
18.Chart -fx-border-color: rgba(0,16,35,0.5) rgba(0,68,55,0.6) transparent rgba(0,68,55,0.7);
19.Set css file to Scene
20.Use addAll() to attach several stylesheets.
21.Set Control Id and use it in css
22.Sample application that shows the use of CSS with the different layout panes provided by the JavaFX layout API.
23.-fx-fill: red;
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.