Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Swing: creating a checkbox or check symbol in menuItem of jMenu

I want to create a checkbox or check symbol in front of menuItem in a JMenu. For example, when we open a Notepad file and click on Format menu there is a checkbox in front of Word Wrap menuItem of the Format menu.

like image 547
Neeraj singh Avatar asked Sep 18 '12 11:09

Neeraj singh


Video Answer


1 Answers

Use a JCheckBoxMenuItem for check boxes in a menu.

like image 162
Andrew Thompson Avatar answered Oct 28 '22 16:10

Andrew Thompson