Gente, boa tarde, estava usando um comando append para colocar um texto em uma JTextArea, como tive que mudar para uma JTextPane, como uso o append.
Abaixo envio a parte onde faço o Append.
public FrmMusicaPlay() {
initComponents();
txttempo.setDocument(new Sonumeros());
txtareamus.setText ("");
File arquivo = new File(“C:\MUSIC PLAY\Musicas\”+txtpmusica.getText()+".txt");
try {
BufferedReader ler = new BufferedReader(new FileReader(arquivo));
String lin = ler.readLine();
while (lin != null){
txtareamus.appendToPane (lin +"\n"); OBS : Tentei isso, mas esta dando erro.
lin = ler.readLine();
}
} catch (Exception e) {
System.out.println(“erroo na leitura”);
}
Obrigado.
