Pessoal,
Coloquei esta função em um botão para gerar um txt, pegando do tutorial daqui:
bConfirmar.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
FileWriter out = new FileWriter("C:\arquivo.txt");
out.write("Paulinho relembrando Java fodasticamente!!!");
out.close();
}
});
E está dando este errinho fera pra caramba ao compilar:
Exception in thread "AWT-EventQueue-0" java.lang.Error: Unresolved compilation problems:
Unhandled exception type IOException
Unhandled exception type IOException
Unhandled exception type IOException
at gui.Tela1.getJButton(Tela1.java:338)
at gui.Tela1.getJContentPane(Tela1.java:145)
at gui.Tela1.getJFrame(Tela1.java:71)
at gui.Tela1.access$0(Tela1.java:66)
at gui.Tela1$4.run(Tela1.java:427)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Alguém pode me ajudar?
Obrigado! 8)