(翻译)第十回 JavaFX2.0单选框Radio Button
Description of "Figure 4-1 RadioButton Sample"
通过研习下文能够了解更多关于在应用中实现单选按钮的信息。
?
?
Description of "Figure 4-2 Three Radio Buttons Combined in a Group"
?
?
?
比如,当rb3被选中时,getSelectedToggle方法返回"rb3,"getUserData方法返回"Contacts"。因此,getResourceAsStream方法接收了"Contacts.jpg."Figure 4-1是应用的输出。
?
Description of "Figure 4-3 Default Focus Settings"
第二个按钮被选中了,但焦点依然在第一个按钮上。使用requestFocus函数可以改变焦点位置,见Example 4-5.
Description of "Figure 4-4 Setting Focus for the Selected Radio Button"
?
?
?
?