JRadioButtonMenuItem & Check Selected State

This example has a fruits menu and a JLabel in the JFrame. The fruit menu contains four Radio button menu items and the user can pick only one among them. In the JLabel, the example displays what menu item is picked by the user. Now, let us create this example.