In this tutorial you will see the MIDlet Example that is going to demonstrate, how to create the radio button in J2ME using MIDlet. The radio button is use to choose only one option at a time. To create the radio button we are using the EXCLUSIVE keyword in our source code as follows:
|list = new List("Sex", List.EXCLUSIVE);|
This example will show the confirmation message (option selected by user), once it'll get the selection from user.
The Application look like as follows:
The Source code of RadioButton.java is as follows:
Liked it! Share this Tutorial