In my application, I'd like to create a bullet ed list of data in a label. How can i do this?
When i searched, I found Styled Text bullet ed list with SWT. How can i do the same with Swing?
Wrap you String
in a html
tag and build away...
JLabel label = new JLabel("<html><ul>" +
"<li>Bananas are yellow</li>" +
"<li>Oranges are orange</li>" +
"<li>Strewberries are red</li>" +
"</ul><html>");
How to give events to these items in label
Given the fact that wasn't part of your original question, that changes the answer, instead, you should be using something like a series of JRadioButton
s, see How to Use Buttons, Check Boxes, and Radio Buttons
Radio buttons and check boxes