2008年12月17日水曜日

JavaFX RadioButton (Swing)


import javafx.ext.swing.SwingToggleGroup;
import javafx.ext.swing.SwingRadioButton;

//A toggle group to switch between radio buttons
var toggleGroup = SwingToggleGroup{};

//Radio buttons
var radioButton1 = SwingRadioButton{
text: "Green"
foreground: Color.SEAGREEN
toggleGroup: toggleGroup
};
var radioButton2 = SwingRadioButton{
text: "Red"
foreground: Color.RED
toggleGroup: toggleGroup
};
var radioButton3 = SwingRadioButton{
text: "Blue"
foreground: Color.BLUE
toggleGroup: toggleGroup
};

0 件のコメント:

コメントを投稿