开发者

How to bind a float or double with JGoodies

开发者 https://www.devze.com 2023-02-02 10:58 出处:网络
I have done binding with ints and longs with no pr开发者_StackOverflow社区obelems. I just use BasicComponentFactory.createIntegerField or LongField. There is no such thing for floats or doubles. Is th

I have done binding with ints and longs with no pr开发者_StackOverflow社区obelems. 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.

0

精彩评论

暂无评论...
验证码 换一张
取 消