1.用mouseclicked方法应该可以的。
2,下面是表示了大概意思的程序。
import java.io.*;public class ReadSource
{
     public static void main(String[] args)
     {
  try
  {
       FileReader file=new FileReader("ReadSource.java");
       BufferedReader buff=new BufferedReader(file);
       boolean eof=false;
       while(!eof)
       {
    String line=buff.readLine();
    if(line==null)
 eof=true;
    else
 JTextArea.append(line);
       }
       buff.close();
  }
  catch(IOException e)
  {
       System.out.println(e.toString());
  }
     }
}

解决方案 »

  1.   

    2。如何从文件中读取数据并当字符串写到JTextArea中?
    只要在读取文件数据成功后,append(追加)到Area中即可
      

  2.   

    2 livedoor():
    ListSelectionListener中有MouseClick的接口吗?能否给个源码例子
      

  3.   

    JTable t=new JTable();
    ....
    t.addMouseListener(new MouseAdapter(){
       public void mouseClicked(MouseEvent e){
       int row=t.rowAtPoint(e.getPoint());
       int col=t.columnAtPoint(e.getPoint());
                                if(....)//这里写上你所需要鼠标事件的行列条件
                                {....}
       }
    });