Tuesday, September 30, 2008

KeyListener

Well, I haven't added any new features really, but I have managed a crude implementation that outputs the game to a JTextPane. It's a bit silly and is set to autoscroll, (I haven't quite figured out how to clear the stupid thing each round), but the use of these frames and such allowed me to implement KeyListeners, which I am VERY excited about. I now can just hit keys quickly and it updates from my commands. No more using "keyboard.nextInt()" and having to hit enter after each command. If anyone knows an easy way to clear a JScrollPane with a TextPane inside of it, please let me know.

No comments: