| Author |
Lookup functionality in JEditorPane
|
Mahesh Kedari
Ranch Hand
Joined: Nov 28, 2009
Posts: 109
|
|
Hi,
I wanted to design a text editor using JEditorPane with hint functionality.
It should display hints, the way IDEs (netbeans, eclipse) show the hint for code.
I am not sure if JEditorPane is a good choice for this requirement. I tried to google it, but didnt a good result.
Can anyone please suggest an approach or any link which will explain this functionaliy?
|
Regards,
Mahesh Kedari - Fidus Technologies Ltd.
|
 |
Rob Spoor
Sheriff
Joined: Oct 27, 2005
Posts: 19216
|
|
|
Do you mean a tool tip? If so, JComponent has two methods called getToolTipText. One of those takes a MouseEvent from which you can determine where the tooltip should be displayed. Subclass JEditorPane to override this method.
|
SCJP 1.4 - SCJP 6 - SCWCD 5
How To Ask Questions How To Answer Questions
|
 |
Mahesh Kedari
Ranch Hand
Joined: Nov 28, 2009
Posts: 109
|
|
Thanks a lot Rob for response.
Rob, I am not sure if its a tooltip component.
I am talking about the hint list which come in most of the IDEs when we type some text in its editor. We get a list of choice starting with the text we have entered.
This hint list is displayed irrespective of any mouse event.
|
 |
 |
|
|
subject: Lookup functionality in JEditorPane
|
|
|