Advice welcomed on creating my own Swing component

后端 未结 2 420
不思量自难忘°
不思量自难忘° 2020-12-07 00:00

Recently I asked which was the best Swing component to bind to a BigDecimal variable (with some particular editing properties). It turns out that none of the standard Swing

2条回答
  •  再見小時候
    2020-12-07 00:30

    Use whatever component you like and register a KeyListener to reject characters to match your behaviour.Add a getValue() & setValue to get/set easily a BiDecimal and some other methods and all the painting will be provided by any JTextComponent.

提交回复
热议问题