The following code reads text from file and displays it in the console via System.out.println command. Instead of displaying it in the console, how do you display it in the Greenfoot World?
public void showExpertMessage () { try{ FileInputStream fstream = new FileInputStream("gatekeeperoutput.txt"); // Get the object of DataInputStream DataInputStream in = new DataInputStream(fstream); BufferedReader br = new BufferedReader(new InputStreamReader(in)); String strLine; //Read File Line By Line while ((strLine = br.readLine()) != null) { // Print the content on the console System.out.println (strLine); } //Close the input stream in.close(); }catch (Exception e){//Catch exception if any System.err.println("Error: " + e.getMessage()); } }