I'm trying to output data from RAF in a text area GUI. I am getting output (title is different length, but 35 char max), but all attempts to put String into columns fails.
This is what I currently have:
while (count < noItems) {
String title = "";
for (int i = 0; i < 35; i++) {
title += raf.readChar();
}
int noCopies = raf.readInt();
double price = raf.readDouble();
result+=String.format("%-40s", title);
result+=(noCopies+"\t "+ twoDigit.format(price)+"\n");
count++;
}
mainTextArea.setText(result);