Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
ファイルをインポートした後に入力される JList があります。JList の最初の項目/要素を強調表示/選択することは可能ですか? の線に沿った線を見つけたいと思って、多くの場所を閲覧しました
list.setFocus(0); //or listSelectionEvent.setSelection(0); //0 referring to index point of the list
もしかしてこれも無理…?
使用する:
list.setSelectedIndex(0);