@Override
    public void actionPerformed(ActionEvent e) {
          JMenuItem menuItem = (JMenuItem)e.getSource();
          if(menuItem == exitItem){
                System.exit(0);
          }
          else if(menuItem == aboutItem){
               JOptionPane.showMessageDialog(this, "Java PE reader v1.0.");
          }
          else if(menuItem == openItem){
              openFileDialog.setVisible(true);
              String filename = openFileDialog.getDirectory() + openFileDialog.getFile();
              if(filename != null){
                 //Reset the screen
                  clear();
                  file = openFileDialog.getFile();
                  //Append the infromation of PE on lables
                  try{
                        ReadPEfile pe = new ReadPEfile(filename);
                        pe.open();
                        
                        String h = pe.getHeader();
                        header.setText(h);
                        
                        String o = pe.getOptionalHeater();
                        optional_header.setText(o);
                        
                        String s = pe.getSection();
                        pe_section.setText(s);
                        
                        String i = pe.getIconInfo();
                        show_icon_info.setText(i);
                        
                        pe.loadIcon();
                               
                        pe.close();
                       
        }
            catch(IOException ex){
                    JOptionPane.showMessageDialog(this, "Error for opening the file!");
            }
              }
          }
           
    }