JList Swing向List Item

时间:2016-02-12 18:41:58

标签: java swing jpanel jlist

我正在尝试创建一个旁边有一个小箭头的JList。单击时,我想要一些与同一列表/面板中显示的列表项关联的内容。我希望,这张照片清楚地说明了我想要实现的目标。

enter image description here

我该怎么做?另外,左边的小三角形特征是什么(称为未来的搜索标签)?

1 个答案:

答案 0 :(得分:4)

I hope this is what you meant. The > "self.lbl1.text = String(responseString)" Optional( write. is a arrowButton which, when activated, displays a JToggleButton containing information about the selected value of the JWindow. This JList will remain visible until the JWindows state is set back to unselected again. The JToggleButton class should be reusable in your code.


Code:

ListPanel