Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for (int j = 0; j < model.getRowCount(); j++) {
- String conteudo = null;
- for (int i = 0; i < 5; i++) {
- if (i == 4) {
- conteudo += (model.getValueAt(j, i)) + ";";
- } else {
- conteudo += (model.getValueAt(j, i));
- }
- }
- String nomeArq1 = "teste.txt";
- try {
- FileWriter fout = new FileWriter(nomeArq1);
- PrintWriter pout = new PrintWriter(fout);
- pout.println(conteudo);
- pout.close();
- fout.close();
- } catch (IOException io1) {
- System.out.println("Erro");
- }
Add Comment
Please, Sign In to add comment