Error in converting ID to Name in Recommendation Engine

I edited the whole class.I try to convert an ItemID which is displayed in displayArea JTextArea(is redirected here from system.out) to an ItemName which is displayed in a messagedialog box after I press button “Get”.I’ve got a Hashtable table to do the conversion.Here is part of my code:

public class HashtableTest2 extends JFrame {
   private JLabel statusLabel;
   private Hashtable<String,String> table;
   private JTextArea displayArea;
   private JTextField  movieNameField;
   private JTextField firstNameField;

private PrintStream standardOut;
   private JTextArea textField;
   private JTextField textField_1;

   // set up GUI to demonstrate Hashtable features
   public HashtableTest2()

      super( "Movie Recommender" );

      statusLabel = new JLabel();
      table = new Hashtable<String,String>();
      displayArea = new JTextArea( 4, 20 );
      displayArea.setEditable( false );
     //Redirect console to displayArea
      PrintStream printStream = new PrintStream(new CustomOutputStream(displayArea));
      standardOut = System.out;
      JPanel northSubPanel = new JPanel();

      northSubPanel.add( new JLabel( "ID" ) );
      firstNameField = new JTextField( 8 );
      northSubPanel.add( firstNameField );

      northSubPanel.add( new JLabel( " movie name (key)" ) );
      movieNameField = new JTextField( 8 );
      northSubPanel.add(  movieNameField );

      JPanel northPanel = new JPanel();
      northPanel.setLayout( new BorderLayout() );
      northPanel.add( northSubPanel, BorderLayout.NORTH );
      northPanel.add( statusLabel, BorderLayout.SOUTH );

      JPanel southPanel = new JPanel();
      southPanel.setLayout( new GridLayout( 2, 5 ) );

      // adds event handler for ID textArea displayed in MovieName textArea
      movieNameField.addKeyListener(new KeyListener() {

        public void keyPressed(KeyEvent arg0) {
            // TODO Auto-generated method stub


        public void keyReleased(KeyEvent arg0) {

                   table.put("Four Rooms",  "3");
                   table.put("Get Shorty","4");
                   table.put("Shanghai Triad","6");
                   table.put("Twelve Monkeys","7");
                   table.put("Dead Man Walking","9");
                   table.put("Richard III","10");
                   table.put("204", "Back");
                   table.put("5", "Copycat");
                   table.put("7", "Twelve Monkeys");

        public void keyTyped(KeyEvent e) {
            // TODO Auto-generated method stub



      // button to get value for specific key
      JButton getButton = new JButton( "Get" );


         new ActionListener() {

            // get value for specific key
            public void actionPerformed( ActionEvent event )
               Object value = table.get(  movieNameField.getText() );

               TestItemRecommend other = new TestItemRecommend(HashtableTest2.this);

                String t = displayArea.getText();

                String c = textField_1.getText();

                //Display In messagedialog box what displayArea shows and Convert it from ID to Name

                JTextArea panel = new JTextArea();


                JScrollPane scrollPane = new JScrollPane(panel);

                JOptionPane.showMessageDialog(null, scrollPane,"Movies We Recommend", 0);


      southPanel.add( getButton );

      textField_1 = new JTextField();

      // button to display hash table elements
      JButton listElementsButton = new JButton( "List objects" );


         new ActionListener() {

            // display hash table elements
            public void actionPerformed( ActionEvent event )

                 String d = textField_1.getText();

                   String e = table.get(d);
                if (e==null) e= "Nothing Found.";

               StringBuffer buffer = new StringBuffer();

               for ( Enumeration<String> enumeration = table.elements();
                     enumeration.hasMoreElements(); )
                     enumeration.nextElement() ).append( '/n' );

               displayArea.setText( buffer.toString() );


      southPanel.add( listElementsButton );

and I’m getting no result.I found that the problem is in String e for which I get a null!If I manually set the value of textField_1,I get result,but when I’m asking to do this automatically,(by Code)it doesn’t.What do you suggest?
Thank you!