I have a piece of Java code where users will get a bunch of outputs (outputs are numbers).
I am trying to edit this code so that I can display the output as a Java Applet via webpage. Here's a part of the result I need to show.
String s1 = String.format("%9.0f\n", (double)N);
String s2 = String.format("%10.20f\n", fX);
String s3 = String.format("%10.20f\n", fY);
......
String s10 = ...;
System.out.printf("Here are all the running results. ");
System.out.printf(s1);
System.out.printf(s2);
System.out.printf(s3);
......
System.out.printf(s10);
My problem is, I can do this as a regular Java program but I cannot make it happen as a Java Applet. I need to make it as an applet to collect data from users and detect if there's any differences. I tried JLabel and JTextField but they both only accept strings as output. I cannot find a way to display variables' values in Java Applet.
I am also not sure if using Java Applet is the best way to do so, cause I don't really find too many amazing things Java Applet can do while I am working on this. Looking for chances to implement this into a PHP page if Java Applet is a dead end.