1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
package ru.olamedia.game; import javax.swing.DefaultListModel; import javax.swing.JList; public class DynamicJList extends JList { private static final long serialVersionUID = 8188447632893130182L; public DynamicJList() { super(new DefaultListModel()); } public DefaultListModel getContents() { return (DefaultListModel) getModel(); } }