Hi, I'm sort of a newbie at
java applets, and kind of to java in general. I've done basic java programming in college but that was all command line stuff, this is new to me.
I'm trying to do what should be simple (at least in my mind) I have the basic page worked out and it is working somewhat. The page consist of two frames, the applet is in the main frame and simply consist of a text area, a combo box, and a button. In the text area a user should be able to copy and paste a large selection of text in either German, Italian, French, Spanish, or English, then while they are reading the text if they wish to translate a
word they can select a dictionary from the combo box and press the button and the translation dictionary will open in the right pane. I sort of have it working though not to the liking of the person that I'm writing it for. Here is a look at what is working right now:
http://classroom.fctl.ucf.edu/language/newlanguage A little background: I'm rewriting this from JavaScript because JavaScript isn't really cross platform compliant, heck; it is not even cross browser compliant.
Here is the problem that I'm having:
The User wants the program to do the lookup with the selected dictionary as soon as the word is double clicked. I tried to implement this and I searched google but I can't find an onSelection() method, or can't find out something similar, like in java script. So what the work around to this was a customized Popup menu Driven by the right click event. The problem with this is that a normal TextArea can�t have a modified popup menu because the OS�s popup menu overrides it, and if I use a JTextArea then I have to jump through hoops to get copy/cut/paste to work.
Here is my question, Can anyone see a simpler workaround to this problem? If not can you point me in the right direction to a solid solution to this. I�ve been reading so many forums, help docs, class specifications, and Code that my eyes are crossed and I confused myself. I Guess all I need is a push in the right direction�may be one of you did an example of something with a text area that sort of meets my needs that you can link me to and I can get the rest.
A little footnote here: if you looked at the link you can see that it goes to a university webpage. This is not a class assignment! I know some people have problems with helping students with projects and I don�t blame them.
Thanks in advance for any help that you all can give me!
Drew Thomas
Technology Assistant
FCTL UCF
http://www.fctl.ucf.edu/