Editable Highlight Currency Table : Grid Table « Swing Components « Java
Editable Highlight Currency Table
Editable Highlight Currency Table : Grid Table « Swing Components « Java
Editable Highlight Currency Table
间隔色的 JTable
Marc Nuri’s Happy Coding Blog » JTable Alternate Row Background
JTable Alternate Row BackgroundJTable不同行用不同顏色表示
Displaying a jTable inside another jTable // JTable cellRenderer
JTable常见用法细则
CJSDN开发者社区 – 怎么实现一个table的Cell显示多行信息?
怎么实现一个table的Cell显示多行信息?
JavaWorld@TW Java論壇 – 如何在JTable的cell中实现JTextArea
如何在JTable的cell中实现JTextArea
如何用JTable设置表头多行 [精華]
Comments about Data problem when binding with db
creating simple own convertor is very easy. Here is very very very
simple convertor for jtextfield. Code is ugly and calls deprecated
methods, but it is just an example! 😀import java.util.Date;
import org.jdesktop.beansbinding.*;public class SimpleDateConverter extends Converter {
public Object convertForward(Object arg) {
return ((Date) arg).toGMTString();
}public Object convertReverse(Object arg) {
Date date = new Date();
date.setTime(Date.parse((String) arg));
return date;
}
}Setting convertor for textfield which is binded to Date jtable column is
also very easy…
– add convertor class into your project, compile file and drag and drop
it from project tree into your form.
– invoke Bind dialog for textfield (popup -> Bind -> text)
– change “Update Source When" to “Enter is pressed or focus is lost",
our convertor will convert only “final" value
– in Converter list select simpleConverter1 component, it is instance
of our drag-and-dropped converterAlso you can set converter without addding bean to form, just use “…"
button and use for example Custom Code property editor and call your
methods to get convertor instance.Now you should be able to modify Date value using textfield. But there
is no error handling, no validators, but this is another story.