Tooltips partly hidden under Canvas.

I have a Jpanel right beside a Canvas. The Jpanel contains some JButtons and JComboBoxes with tool tips. The problem is that a long tool tips string will be hidden under the Canvas. A similar thing happens if I place the JPanel above the Canvas, when the JComboBox is opened and "droped down" then most of the combobox box is hidden under the Canvas. Can I set a higher Z-order (or similar) on the Jpanel?
labattiAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
conickConnect With a Mentor Commented:
Here it is:
http://java.sun.com/products/jfc/tsc/articles/mixing/index.html
Apparently the Swing Connection is in a "rebuilding" mode.
0
 
conickCommented:
You're running into heavy/light weight component issues.
Canvas is a heavyweight component (it has a native peer).
This means it will show above the lightweight component (JPanel).
If at all possible use all lightweight or all heavyweight, even though you CAN mix them together.
A simple solution if you have access to the Canvas code:  
Change the base class from Canvas to JComponent.

Take a look at the Sun's Swing Connection site for more info.
Anyone have that address?? My bookmarks got whacked again :(

Good Luck!
0
 
labattiAuthor Commented:
I would probably not have found that myself. Great! Thanks!!
0
All Courses

From novice to tech pro — start learning today.