0
古典的なブートストラップアラート(here)のようなスタイルのユーザーにアラートを表示するペインを作成したいとします。JavaFXで 'ブートストラップ'スタイルアラートを作成するには
これまでのところ、グリッドパネルを使用してみましたが、それほど悪くはありません。特にテキストを追加すると、結果には満足していません。
<GridPane minHeight="40" maxHeight = "40">
<VBox fx:id="MessageVbox" alignment="BASELINE_LEFT" GridPane.columnIndex="0" GridPane.rowIndex="0">
<Label fx:id="Message" text="Alert Message" />
<padding>
<Insets bottom="5.0" left="10.0" right="10.0" top="10.0" />
</padding>
</VBox>
<Button fx:id="Dismiss" alignment="TOP_RIGHT" onAction="#handleDismiss" text="X" GridPane.columnIndex="1" GridPane.rowIndex="0" />
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0"
percentWidth="90.0" prefWidth="100.0" />
<ColumnConstraints halignment="RIGHT" hgrow="SOMETIMES"
minWidth="10.0" percentWidth="10.0" prefWidth="100.0" />
</columnConstraints>
</GridPane>
これは、あなたの助けになるかもしれません。http://stackoverflow.com/questions/21268062/bootstrap-with-javafx –