简体   繁体   中英

How to bind a float or double with JGoodies

I have done binding with ints and longs with no probelems. I just use BasicComponentFactory.createIntegerField or LongField. There is no such thing for floats or doubles. Is there a way to do bind these primitives?

ValueModel valueModelxField = adapter.getBufferedModel("x");
xJTextField = BasicComponentFactory.createFormattedTextField(valueModelxField, new DecimalFormat("0.#####"));

This is how I got it to work.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM