0

How to set or alternative mathed to set System.out.println on TextArea show output

public static void move(int n, int startPole, int endPole) { if (n== 0) { return; } int intermediatePole = 6 - startPole - endPole; move(n-1, startPole, intermediatePole); System.out.println("Move " +n + " from " + startPole + " to " +endPole); move(n-1, intermediatePole, endPole); }

21st Nov 2017, 7:49 PM
Gohar Ejaz
Gohar Ejaz - avatar
1 Antwort
0
You can’t. The System class’s output stream is directed to the console, and cannot be changed. You have to edit the text area using a method that the TextArea class contains to edit the text it displays. I’m not positive what the method is, but you can look it up.
30th Nov 2017, 6:20 PM
Nick Burnett