You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
773 B
35 lines
773 B
package com.origin.beans;
|
|
|
|
import java.awt.BorderLayout;
|
|
import javax.swing.DefaultListModel;
|
|
import javax.swing.JLabel;
|
|
import javax.swing.JList;
|
|
import javax.swing.JPanel;
|
|
import javax.swing.JScrollPane;
|
|
|
|
public class KelsenJList
|
|
extends JPanel
|
|
{
|
|
JLabel iconLabel = null;
|
|
JList iconJList = null;
|
|
DefaultListModel dlm;
|
|
|
|
public KelsenJList(Object[][] obj)
|
|
{
|
|
this.dlm = new DefaultListModel();
|
|
for (int i = 0; i < obj.length; i++) {
|
|
this.dlm.addElement(obj[i]);
|
|
}
|
|
this.iconJList = new JList(this.dlm);
|
|
iconJList.setCellRenderer(new KelsenJListCellRenderer());
|
|
JScrollPane jsp = new JScrollPane(this.iconJList);
|
|
setLayout(new BorderLayout());
|
|
add(jsp);
|
|
}
|
|
|
|
public JList getJList()
|
|
{
|
|
return this.iconJList;
|
|
}
|
|
}
|