jlabel and printf
How can you print out data on a jlabel, in the same formatting as a printf? I have a line of code:
EDIT: It would also help to save printf to a variable instead of the screen...
System.out.printf("%s %8s %7s %10s %5s %8s\n","Name","Price","Stock","Product #", "Value+%5", "Title");
That I would like to put into a jlabel. Any thoughts?EDIT: It would also help to save printf to a variable instead of the screen...
Comments
http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html#format%28java.lang.String%2C%20java.lang.Object...%29