Tuesday, June 5, 2012

Drop shadow on text, using FXML

Drop shadow on text, using FXML


<?xml version="1.0" encoding="UTF-8"?>

<?import java.lang.*?>
<?import java.util.*?>
<?import javafx.scene.*?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<?import javafx.scene.text.*?>
<?import javafx.scene.effect.*?>

<AnchorPane id="AnchorPane" prefHeight="200" prefWidth="320" xmlns:fx="http://javafx.com/fxml" fx:controller="javafxml_text.Sample">
    <children>

        <Text layoutX="126" layoutY="30" stroke="BLACK" text="Text with Shadow (using FXML)">
            <effect>
                <DropShadow color="GRAY" offsetX="5.0" offsetY="5.0" />
            </effect>
        </Text>
        
    </children>
</AnchorPane>


Compare:
- Drop shadow on text, using JavaFX


No comments:

Post a Comment