@@ -0,0 +1,2053 @@
+package hangman;%0A%0Aimport javax.swing.*;%0Aimport java.awt.*;%0Aimport java.awt.event.*;%0Aimport java.util.*;%0Aimport java.util.List;%0Aimport java.io.IOException;%0A%0Apublic class Hangman %7B%0A%09%0A%09private static String inFile;%0A%09private static JButton choice;%0A%09private static List%3CString%3E separateWords;%0A%09private static List%3CString%3E mystery;%0A%09private static JTextArea unknownWord;%0A%09private static int locationOfLetter;%0A%09%0A%09static class ButtonsDoThings implements ActionListener %7B%0A%09%09%0A%09%09public void actionPerformed(ActionEvent event)%7B%0A%09%09%09if(event.getSource() == choice)%7B%0A%09%09%09%09if(separateWords.indexOf(choice.getText())= true)%7B%0A%09%09%09%09%09locationOfLetter = separateWords.indexOf(choice.getText());%0A%09%09%09%09%09mystery.add(locationOfLetter,choice.getText());%0A%09%09%09%09%09unknownWord.setText(mystery.toString());%0A%09%09%09%09%7D%0A%09%09%09%7D%0A%09%09%7D%0A%09%7D%0A%09%0A%09%0A%09public static void main(String%5B%5D args) throws IOException%7B%0A%09%09%0A%09%09inFile = JOptionPane.showInputDialog(%22file name%22);%0A%09%09%0A%09%09JFrame frame = new JFrame(%22Hangman...ish%22);%0A%09%09frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);%0A%09%09frame.setSize(400,400);%0A%09%09frame.setResizable(false);%0A%09%09%0A%09%09Input read = new Input(inFile);%0A%09%09List%3CString%3E separateWords = new ArrayList%3CString%3E();%0A%09%09try %7B%0A%09%09%09separateWords = read.loadFile();%0A%09%09%09List%3CString%3E mystery = new ArrayList%3CString%3E();%0A%09%09%09for (int a = 0; a %3C= separateWords.size();a++)%7B%0A%09%09%09%09mystery.add(%22*%22);%0A%09%09%09%7D%0A%09%09%7Dcatch (IOException ioe)%7B%0A%09%09%09System.out.println(ioe.getMessage());%0A%09%09%7D%0A%09%09%0A%09%09JPanel base = new JPanel(new GridLayout(1,2));%0A%09%09frame.setContentPane(base);%0A%09%09%0A%09%09JPanel left = new JPanel(new GridLayout(9,3));%0A%09%09base.add(left);%0A%09%09%0A%09%09JPanel right = new JPanel(new BorderLayout());%0A%09%09base.add(right);%0A%09%09JLabel displayLives = new JLabel();%0A%09%09right.add(displayLives, BorderLayout.CENTER);%0A%09%09JTextArea unknownWord = new JTextArea();%0A%09%09unknownWord.setText(mystery.toString());%0A%09%09right.add(unknownWord, BorderLayout.NORTH);%0A%09%09%09%0A%09%09for(char c = 'a';c %3C= 'z'; c++)%7B%0A%09%09%09JButton choice = new JButton(Character.toString(c));%0A%09%09%09choice.addActionListener(new ButtonsDoThings());%0A%09%09%09left.add(choice);%0A%09%09%7D%0A%09%09frame.setVisible(true);%0A%09%7D%0A%0A%7D%0A

Create Hangman.java