Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Exception occurred during event dispatching:  RSS feed

 
Murali Obla
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Folks ,
I am using a ToolBar which contains group of buttons.Initially I am setting the Button Border as Empty...and I in MouseEvent ie while mouse entered to that component here is Button I am changin' the Border to Etched...While the mouse exited again I am converting back to empty border.The problem here is while the mouse enters a button it's size is quite expanding and that is affectin' to all other buttons in the tool bar...
and one more I am getting this Exception sometimes
Exception occurred during event dispatching:
java.lang.NullPointerException
void javax.swing.JComponent._paintImmediately(int, int, int, int)
void javax.swing.JComponent.paintImmediately(int, int, int, int)
void javax.swing.RepaintManager.paintDirtyRegions()

What would be the problem ,
Can anyone help me please....
Thanks in Advance,
Murli
 
Rajendar Goud
Ranch Hand
Posts: 220
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
i think its happening, b/c when u keep the border as empty,its fine with the components besides it. But when u assign any border,naturally it will take some space of the component to which the border has been assigned. so it is disturbing the alignment of the other components.i think there had a question on this topic earlier also.please a search...may be u will find the proper explanation..
Raj
 
Murali Obla
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Raj,

I'll search for that..Can u tell me why that exception occurs...
Regards,
Murli
 
Mr. C Lamont Gilbert
Ranch Hand
Posts: 1170
Eclipse IDE Hibernate Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
need to see more code, but I would guess the order of events is not favoring what you are trying to do.
 
Jeff Smith
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Murali, it sounds like you're trying to get a rollover effect for your toolbar buttons, if that's the case you don't need to use mouse listeners. The following code will achieve the same thing without all the extra work:
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!