Gostaria de pedir uma ajuda, tenho este código abaixo e no momento de exibir o texto, mas não mostra formatado. Gostaria que ele pulasse uma linha no momento de exibir na tela.
import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import javax.swing.JFrame;
import javax.swing.JOptionPane;
public class Busca {
public static void main(String[] args) throws FileNotFoundException, IOException {
String Busca = "up"; //Pesquisando por UP
FileReader file = new FileReader("C:\\New Folder\\reports_java\\report_st_he.txt"); //Abrindo o arquivo txt
BufferedReader buffer = new BufferedReader(file); //Para leitura do arquivo
String Line;
Integer i = 1;
do{
if ((Line = buffer.readLine()) != null){
if (Line.contains("up")){
JFrame frame = new JFrame();
JOptionPane.showMessageDialog(frame, "Msg encontrada na linha: \r\n" + Line);
}
else {
JFrame frame = new JFrame();
JOptionPane.showMessageDialog(frame, "msg não encontrada!" );
}
}
}
while (Line != null);
}
}
Vlw.


