Reputation: 53
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.
Upvotes: 4
Views: 3433
Reputation: 51525
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
Upvotes: 7
Reputation: 36611
I do not know how to create a tooltip containing a scrollbar, but I can think of several reasons why you should reconsider whether you want this.
So my advise: rethink your UI design. Judging from the text of your tooltip in the question, I would guess you need some sort of overlay displaying a "Please wait" message.
Upvotes: 2