Guest User

Untitled

a guest
Apr 23rd, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. for (int j = 0; j < model.getRowCount(); j++) {
  2. String conteudo = null;
  3. for (int i = 0; i < 5; i++) {
  4. if (i == 4) {
  5. conteudo += (model.getValueAt(j, i)) + ";";
  6. } else {
  7. conteudo += (model.getValueAt(j, i));
  8. }
  9. }
  10.  
  11.  
  12.  
  13. String nomeArq1 = "teste.txt";
  14. try {
  15. FileWriter fout = new FileWriter(nomeArq1);
  16. PrintWriter pout = new PrintWriter(fout);
  17.  
  18. pout.println(conteudo);
  19.  
  20. pout.close();
  21. fout.close();
  22.  
  23. } catch (IOException io1) {
  24. System.out.println("Erro");
  25. }
Add Comment
Please, Sign In to add comment