Hi Thomas,
Welcome to Java Ranch.
Please copy paste the code below into a file named MainFrame.java
Try to compile and execute, it should work properly.
In the executed program, double click on any word in the text area,
this will cause a message to be displayed in the text box below
the text area.
Hope this helps.