Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

customized jcomponent icon is painting itslef on top of menu

 
umesh kacha
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have come across one defect with my customized JComponent icon and my customized Jmenu.When I have opened one closable tabbed pane which contains customized JComponent icon. And when I open menu and when menu comes above closable tabbed pane and when I am going to put mouse over JComponent custom icon then that icon is painting itself on top of menubar.In JComponent custom icon�s mouse over event I am repainting my JComponent custom icon.



Please help I am not able to find problem why this is happening. I cant put code in this mail or your java.net community because our company policy. Please help me.
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
> painting itself on top

most problems in this area are due to mixing awt components with swing components

http://java.sun.com/products/jfc/tsc/articles/mixing/
 
umesh kacha
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No I have checked both components are light weight components and still it is overlapping that is the problem.Why this is happening?I am not able to find root cause.
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
2nd (and last) guess:

> In JComponent custom icon�s mouse over event I am repainting my JComponent custom icon.

instead, repaint the icon's parent

p.s. why the need for a second post in this forum?
 
umesh kacha
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanking you very much.I found solution.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!