Calculator application including keyboard input in java swing

♀尐吖头ヾ 提交于 2019-11-26 22:05:57

问题


I have a calculator application in java swing, which is working properly with mouse click input. Now I want it to read input using keyboard button stroke. I had heard about the glass pane in java tutorial, but i need to know any other simple method to meet the requirement.


回答1:


KeyPadPanel is an example that uses Action and Key Bindings for numeric entry.



来源:https://stackoverflow.com/questions/10099686/calculator-application-including-keyboard-input-in-java-swing

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!