Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Tooltip in swing

I made to tool tip for comportment in swing using some html tags

_graph.setToolTipText("<html><div style=\"width: 300px; height: 100px;" 
   +  " overflow: auto; border: 0;<p style=\"padding:2 5 2 5;\"></div>Please Wait...");

Here _graph is object of component. Problem is, if data is exceeds I need to scroll but it is not happening.please anyone suggest me to make scrollbar.

like image 736
user1145474 Avatar asked Sep 03 '25 05:09

user1145474


1 Answers

Default tooltips are very basic: simply a lable-like component, even limited to text-only (except html). As I already mentioned, the way to more fancy tooltips is to extend JTooltip and let your graph component return that custom tooltip in createTooltip. An example and some pitfalls were recently discussed over at OTN

like image 183
kleopatra Avatar answered Sep 04 '25 18:09

kleopatra