• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

Event handling of RadioButton in JavaFX  RSS feed

 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
FXML code part :

<fx:define>
<ToggleGroup fx:id="fromBusOrTrain" />
</fx:define>
<children>
<RadioButton mnemonicParsing="false" text="Bus Stand" textFill="#1D94CB" toggleGroup = "$fromBusOrTrain">
<font>
<Font name="Arial Bold" size="14.0" />
</font>
</RadioButton>
<RadioButton mnemonicParsing="false" prefHeight="38.0" prefWidth="133.0" text="Trailway Station" textFill="#1D94CB" GridPane.rowIndex="1" toggleGroup = "$fromBusOrTrain">
<font>
<Font name="Arial Bold" size="14.0" />
</font>
</RadioButton>
</children>

I need to get selected radiobutton from this group.. How to bind action in FXML? And how to get it in controller (Java) class?
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!