• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

Lookup functionality in JEditorPane  RSS feed

 
Ranch Hand
Posts: 111
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Sheriff
Posts: 21745
102
Chrome Eclipse IDE Java Spring Ubuntu VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Mahesh Kedari
Ranch Hand
Posts: 111
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
You are HERE! The other map is obviously wrong. Better confirm with this tiny ad:
how do I do my own kindle-like thing - without amazon
https://coderanch.com/t/711421/engineering/kindle-amazon
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!