You’re making all the Swing calls in the EDT (vs directly in the threads you mentioned), right?

Tom

On Mar 7, 2024, at 6:40 AM, Owen Thomas <owen.paul.tho...@gmail.com> wrote:


The numbers running down the left are milliseconds, all others are nanos. As you can see, all this happens within the same millisecond, and perhaps I'm thinking that Swing wasn't built with rendering output at this rate in mind.

Anyway, I'd love to know what people have to say. :)

On Thu, 7 Mar 2024 at 22:04, Owen Thomas <owen.paul.tho...@gmail.com> wrote:
Hello Netbeans people. This is not a question for Netbeans itself, but I know there are a lot of clever people here who may be able to give me a pointer or two, so please look away if this question might offend. I hope it doesn't. :)

My program uses Swing. It outputs text to a window. The output is attached. At a particular point (the line is highlighted in the attached screenshot) the output begins to wobble; that is, the line spacing becomes uneven and (perhaps) even characters appear to be squashed.

Now, I thought this might be something to do with how quickly the output is produced (it is produced very quickly - those numbers are time measurements in nanoseconds) and how competing threads might cause the Swing GUI innards to lose their grip somehow, but when I tried wrapping some of my code within synchronised blocks, I didn't see any improvement.

Surely I think to myself things like this have been done before. Does anyone know how I might be able to stop this wobbling?

Thanks,

  Owen.

Reply via email to