按你的流程看
你的textArea2中什么都不显示是否是因为没点button1,直接点shaButton了?
那样的话因为textArea1中没有被setText所以你的textArea2中什么都不显示
顺便说一下,因为我编程习惯的问题
你的2个button的为什么一个是button1shaButton,不是button1,button2?

解决方案 »

  1.   

    我做的事sha加密算法,所以~~
    class ButtonsActionListener implements ActionListener
    {
    public void actionPerformed(ActionEvent e)
    {
     if(e.getSource()==viewButton)  
        {FileDialog fd1=new FileDialog(aWindow,"OpenFile",FileDialog.LOAD); 
          fd1.show();
          filePath.setText(fd1.getDirectory()+fd1.getFile()); 
         }
    if(e.getSource()==shaButton)
    {
    //File inFile=new File(filePath.getText());//InputToOutput  inToOut=new InputToOutput();
    //outText.setText(inToOut.fileToSha(inFile));outText.setText(filePath.getText());}
      

  2.   

    filePath对应的class是 什么阿?
    outText也是这个问题