当前位置:首页>开发>正文

java的列表怎么取值

2023-06-05 23:04:03 互联网 未知 开发

 java的列表怎么取值

java的列表怎么取值?


swing JList

int getSelectedIndex()
Returns the smallest selected cell index the selection when only a single item is selected in the list.
int[] getSelectedIndices()
Returns an array of all of the selected indices, in increasing order.
Object getSelectedValue()
Returns the value for the smallest selected cell index the selected value when only a single item is selected in the list.
Object[] getSelectedValues()
Returns an array of all the selected values, in increasing order based on their indices in the list.

最新文章

随便看看