Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Character by Character input  RSS feed

 
Muralidhar Krishnamoorthy
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
I just wanted to know if it is possible to get input character by character and then display it on the screen.Im right now working on a calculator like program which uses a similar LED display system. It requires the user to enter the numbers (digit after digit) and display it on the LED Panel as and when a keystroke is made.Also it shud accept Mouse Clicks from the Buttons Panel and add the digit clicked to the already entered number and be displayed on the LED Panel.
If any one can think of a solution to this please post it here
Reg
Muralidhar
 
Vlad Patryshev
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The answer is: use Swing, not file i/o. You already have gui controls, right?
 
Manfred Leonhardt
Ranch Hand
Posts: 1492
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,
The following code does what you want in a simple manner.

Enjoy,
Manfred.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!