Hello!
I am doing my own tooltip like that for eclipse
doc.
For this I use JDialog which has child JLabel wrapped inside JScrollPane.
Of course as user moves cursor I need to change text of JLabel.
The most important is that I want JLabel to have just enough size to accomodate text only.
And if text is too big and size of JLabel should be very big then I want to decrease size of JLabel.
The problem for me is how to calculate and resize JDialog with JLabel so that JLabel is large enough to accomodate its text.
I guess I need to calculate size of JLabel using its text . But I do not know how to do that and also how to resize JLabel dynamically.