< prev index next >

src/demo/share/jfc/J2Ddemo/java2d/demos/Fonts/Tree.java

Print this page

        

*** 49,60 **** */ @SuppressWarnings("serial") public class Tree extends AnimatingSurface { private char theC = 'A'; ! private Character theT = new Character(theC); ! private Character theR = new Character((char) (theC + 1)); public Tree() { setBackground(WHITE); } --- 49,60 ---- */ @SuppressWarnings("serial") public class Tree extends AnimatingSurface { private char theC = 'A'; ! private Character theT = Character.valueOf(theC); ! private Character theR = Character.valueOf((char) (theC + 1)); public Tree() { setBackground(WHITE); }
*** 63,75 **** } @Override public void step(int w, int h) { setSleepAmount(4000); ! theT = new Character(theC = ((char) (theC + 1))); ! theR = new Character((char) (theC + 1)); ! if (theR.compareTo(new Character('z')) == 0) { theC = 'A'; } } @Override --- 63,75 ---- } @Override public void step(int w, int h) { setSleepAmount(4000); ! theT = Character.valueOf(theC = ((char) (theC + 1))); ! theR = Character.valueOf((char) (theC + 1)); ! if (theR.compareTo(Character.valueOf('z')) == 0) { theC = 'A'; } } @Override
< prev index next >