Switched my logic to be
1 2 3 4 5 6 7 8 9 10
| for ( int i = 0; i < ConstantsT.message.length(); i++ ) {
try { Thread.sleep(100); } catch (InterruptedException e) { } screenMessage.setText(ConstantsT.message.substring(0, i )); } |
This fixed the error.. what im not liking is
Class extends Applet <--ideal cause my game runs in an applet
* The text as its is typing flashes and starts to blink faster as the text writes itself out.
Class extends JFrame <--nifty but no sure how to integrate with my applet game
* Doesn't flash but pops up in a new window after running. which leads me to believe I can't use this for the applet. Which would also mean I may have to redesign my entire game to allow this text to work correctly.
Those are the two biggies at the moment with this class. Any thoughts?