表单生成器 swing-formbuilder

fmms 13年前
     swing-formbuilder 是一个能够动态生成基于 Swing 表单的 Java 开源库。可以以下两种方式创建:    <br />    <pre class="brush:java; toolbar: true; auto-links: false;">Form<Person> form = FormBuilder.map( Person.class ).buildForm();</pre>或    <br />    <pre class="brush:java; toolbar: true; auto-links: false;">Form<Person> form = FormBuilder.map( Person.class ).with( new SampleBeanMapper<Person>() {             @Override             protected JComponent mapBean( Person sample,                                           SampleContext<Person> ctx )             {                 final Box box = Box.createHorizontalBox();                 box.add( ctx.label( sample.getName() ) );                 box.add( ctx.editor( sample.getName() ) );                 return box;             } } ).buildForm();</pre>    <p><strong>项目主页:</strong><a href="http://www.open-open.com/lib/view/home/1323354388046" target="_blank">http://www.open-open.com/lib/view/home/1323354388046</a></p>