blic void changeWord() throws IOException { String inn = word1.getText(); String ut = word2.getText(); JFileChooser fc = new JFileChooser("D:\\Skole\\Eclipse\\Eclipse examples\\new_java\\"); File f = null; int result = fc.showOpenDialog(fc); if( result == JFileChooser.APPROVE_OPTION) { f = fc.getSelectedFile(); String path = f.getAbsolutePath(); oppg2 = new oppgave_2(path); FileReader fr = new FileReader(f); BufferedReader br = new BufferedReader(fr); String line = br.readLine(); String kilde =""; while( line!=null) { kilde+=line; line =br.readLine(); } br.close(); oppg2.byttUt(kilde,ut,inn);