• Post Reply Bookmark Topic Watch Topic
  • New Topic

JTextPane: scrolling with mouse wheel

 
Alexandr Shvedov
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello!
I have JTextPane component in my application, which is wraped in JScrollPane. It was function good, until I added MouseWheelListener to JTextPane (I use it to change font size when CTRL is pressed). After that it is impossible to scroll text with mouse wheel.
How can I return default behaviour of the component and save my listener?
 
Alexandr Shvedov
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've solved this problem. I just write this at the end of my handler

)
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!