Add ToolTipText in Jlist Item(s)

后端 未结 3 888
盖世英雄少女心
盖世英雄少女心 2020-12-12 03:54
public static void populateJList(JList list) {
        ArrayList contents= DataAccess.getContents();
        DefaultListModel listModel = new DefaultLi         


        
3条回答
  •  无人及你
    2020-12-12 04:16

    1. You can override the getToolTipText(..) method of the JList.

    2. I believe you can also use a custom renderer which invokes the setToolTipText(...) method.

提交回复
热议问题