I have a BufferedReader loop that checks if the next lines != null, If the line has text on it, the reader will read the line, now I successfully made it do this, it reads the line and then It wont read the next because it already went thought the if loop, what would i do to make it keep reading lines until there are no more lines to read? I could use a while loop but Im kinda confused as to where to put it.
int numberOfLines = 0;
String[] textData = new String[numberOfLines];
if (red.readLine() != null) {
numberOfLines++;
int i;
for (i = 0; i < numberOfLines; i++) {
textData[i] = red.readLine();
//System.out.println(textData[i]);
textArea.append("\n"); //Break line after every read line
textArea.append(textData[i]);
}
}