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?
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?
将您包裹String
在html
标签中并构建...
JLabel label = new JLabel("<html><ul>" +
"<li>Bananas are yellow</li>" +
"<li>Oranges are orange</li>" +
"<li>Strewberries are red</li>" +
"</ul><html>");
如何为标签中的这些项目提供事件
鉴于这不是您原始问题的一部分,这会改变答案,相反,您应该使用类似一系列JRadioButton
s 的东西,请参阅如何使用按钮、复选框和单选按钮
单选按钮和复选框