dudaskank
vc deve utilizar o JScrollPane do swing… coloque ele no panel e o label no JScrollPane que vc criar.
espero que ajude 
guilherme.cq
Não funcionou... eu já havia tentado...
public class SwingFile extends JFrame {
String texto = "<html>";
JFrame frame;
SwingFile()
{
super("Arquivo X");
}
public String mostraArquivo() throws FileNotFoundException {
File file = new File("system.log");
Scanner sc = new Scanner(file);
while (sc.hasNextLine()) {
texto = texto + sc.nextLine() + "<br>";
}
return texto + "</html>";
}
public void criaJanela() throws FileNotFoundException{
JPanel panel = new JPanel();
JLabel labelTexto = new JLabel();
ScrollPane sp = new ScrollPane();
labelTexto.setText(mostraArquivo());
panel.add(labelTexto);
panel.add(sp);
getContentPane().add(panel, BorderLayout.CENTER);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
pack();
setVisible(true);
}
}
Schuenemann
1- Você não colocou o label no scrollpane.
2- Quando for colar um código, cola só a parte relevante dele.
guilherme.cq
Schuenemann
Foi JScrollPane? E qual o erro?