我将创建JList
JPanel
,JPanel
蠕动Jtextfield
和JLabel
,我正在创建此jpanel的列表
public class CasofTablecase extends javax.swing.JPanel {
/**
* Creates new form CasofTablecase
*/
public CasofTablecase() {
initComponents();
}
/**
* This method is called from within the constructor to
// Variables declaration - do not modify
private javax.swing.JLabel jLabel1;
private javax.swing.JTextField jTextField1;
// End of variables declaration
}
我正在为我的班级添加DefaultListCellRenderer
(Jlist
班级):
public class dlcr extends DefaultListCellRenderer{
@Override
public Component getListCellRendererComponent(JList<?> list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
return (new CasofTablecase());
}
}
我的问题是,如果我点击Jtextfield
来写一些内容,但有些事情没有发生,那么如何使用CellEditor
。