저는 Java에 익숙하지 않으며 버튼을 눌렀을 때 테이블에 놓인 새 정보를 업데이트하려고합니다. 여기보고되지 않은 예외 ActionListener에서 java.io.IOException이 발생했습니다.
unreported exception java.io.IOException; must be caught or declared to be thrown
나는에 문제가있어 코드 : 어떤 도움을
public static void updateAction(){
update.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
BufferedWriter bfw = new BufferedWriter(new FileWriter(tmp));
for(int i = 0 ; i < table.getColumnCount() ; i++)
{
bfw.write(table.getColumnName(i));
bfw.write("\t");
}
for (int i = 0 ; i < table.getRowCount(); i++)
{
bfw.newLine();
for(int j = 0 ; j < table.getColumnCount();j++)
{
bfw.write((String)(table.getValueAt(i,j)));
bfw.write("\t");;
}
}
bfw.close();
}});
}
감사합니다 당신이 내게 줄 수있는이 오류를 얻고있다.