Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Tooltip obscured by panel  RSS feed

 
Ben Wood
Ranch Hand
Posts: 342
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have a problem with the tooltips of a series of JButtons on a JToolBar which sits in the NORTH of a BorderLayout being obscured by the panel that sits in the CENTER of the BorderLayout.
Anyone come across this one before and have any suggestions for fixing it please. I can't figure out what's going on. Do I need to give extra weight to the JToolBar...and if so, how?!
thanks in advance
Ben
[ September 25, 2003: Message edited by: Ben Wood ]
 
Joe Ess
Bartender
Posts: 9406
12
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Make sure you are using a javax.swing.JPanel, not a java.awt.Panel. Tooltip is a "lightweight" component, which means it is drawn by the JVM. A Panel would have a native peer which is drawn by the operating system, and on top of whatever the JVM drew.
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you are using a regular AWT Panel instead of a Swing JPanel, you can also make this work by using :
 
Ben Wood
Ranch Hand
Posts: 342
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks guys. I should have clarified, the panel I describe is not really a panel but a javax.media.j3d.Canvas3D, which of course inherits from the AWT.
Nathan's code snippet has done the job
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!