Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » AWT_SWT JTextPane Problem
AWT_SWT JTextPane Problem [message #460793] Wed, 07 September 2005 08:17 Go to next message
Sandro Orlando is currently offline Sandro OrlandoFriend
Messages: 1
Registered: July 2009
Junior Member
Hallo

I have a RCP with a JTextPane as Editor. The JTextPane is placed on
JScrollPane. I have two problems:

1. It flickers when I scroll (it flickers A LOT)
2. When I press CTRL+A I get an
"Unhandled event loop exception
Reason:
object is not an instance of declaring class"

Can anyone help me with these problems? Is there an easy way to hunt down
event loop exceptions?

Thanks for any help
Re: AWT_SWT JTextPane Problem [message #460812 is a reply to message #460793] Wed, 07 September 2005 21:00 Go to previous message
Gordon Hirsch is currently offline Gordon HirschFriend
Messages: 100
Registered: July 2009
Senior Member
On the flicker issue, are you running with a Swing root pane? See the
snippet at:

http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.swt.sni ppets/src/org/eclipse/swt/snippets/Snippet154.java?rev=HEAD& amp;content-type=text/vnd.viewcvs-markup

Even with the root pane in place, I still see a more flicker on Swing
components than SWT components when resizing my main RCP window. It
seems that the Swing components are forced to handle a lot more resize
events than if the same Swing components are running as a standalone
java app.

If you are on windows, you might also consider setting the property
"sun.awt.noerasebackground" to true... it helps a bit more, but it also
has some side effects you may not like. This property prevents clearing
of the background before repainting it. While reducing flicker, it also
means that you occasionally, briefly see junk inside Swing components
before they have a chance to repaint.

Sandro wrote:
> Hallo
>
> I have a RCP with a JTextPane as Editor. The JTextPane is placed on
> JScrollPane. I have two problems:
>
> 1. It flickers when I scroll (it flickers A LOT)
> 2. When I press CTRL+A I get an
> "Unhandled event loop exception
> Reason:
> object is not an instance of declaring class"
>
> Can anyone help me with these problems? Is there an easy way to hunt down
> event loop exceptions?
>
> Thanks for any help
Previous Topic:Display animated GIFs with TableViewer
Next Topic:"no more handles" while displaying many SWT widgets
Goto Forum:
  


Current Time: Fri Apr 26 00:33:17 GMT 2024

Powered by FUDForum. Page generated in 0.03369 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top