自创立于J2ME细胞在LWUIT表
-
25-09-2019 - |
题
我想在我的J2ME应用程序来创建LWUIT表,其中在一列中的所有细胞是一种特定类型的例如的TextField服用十进制输入。
任何人都可以请建议实现这一目标,甚至另一种方法,我可以走?
解决方案
我被找错区域。
除了使用ListCellRenderer
的我延伸Table对象和压倒的createCell
方法。
public class CustomTable extends Table{
public CustomTable(TableModel model) {
super(model);
}
protected Component createCell(Object value, int row, int column, boolean editable) {
switch (column) {
case QUANITY_COLUMN:
// create custom cell and return
...
default:
return super.createCell(value, row, column, editable);
}
}
}
不隶属于 StackOverflow