2

I am working on a simple mailing list program and I have been using Netbeans WYSIWYG GUI designer. My GUI runs and works fine, and when I run it from the IDE it looks as it should do. However I have made a batch file to the jar from the command line and now I get this odd graphical glitch:

enter image description here

When it initially loads, the boxes are fine, but as soon as you type stuff in , they glitch out. Additionally, before anything is typed in the Surname jLable has the small glitch on the letter 'n', whereas the other two labels are completely fine.

I asked a friend to run it on his Linux machine and there were no problems there, so it has to be something to do with my PC. I've attempted to reinstall my GPU drivers but that hasn't changed anything.

Lukasz Medza
  • 469
  • 2
  • 8
  • 23
  • 1
    To me it looks like there's an Exception while drawing. Try running the program with an active Java console to see if there's anything happening under the hood. – Ray Sep 04 '14 at 12:22
  • 2
    Are you properly threading your interactions with Swing? – Tim B Sep 04 '14 at 12:22
  • 1
    Also if you force a full redraw (resize the window, or move another one over it) do the glitches disappear? – Tim B Sep 04 '14 at 12:23
  • @Tim B Yes the glitches disappear when you resize the window – Lukasz Medza Sep 04 '14 at 12:25
  • Alexis's links seems to be spot on. do you perhaps have a Java 8 runtime installed but is Eclipse using a Java 7 JDK? – Gimby Sep 04 '14 at 12:26
  • @LukaszMedza Alexis's link seems identical so investigate that. If not you might be able to work around this by triggering a repaint of your own. – Tim B Sep 04 '14 at 12:28
  • @Grimby I've just tried playing around with the different java versions. Initially I did in fact have java 7 in my IDE and 8 in the command line. However I've tried setting the IDE to 8, and that only made the glitch appear in the IDE. Then I've reverted both to 7, and now it only appears in the cmd and not the IDE. – Lukasz Medza Sep 04 '14 at 12:46
  • 1
    Have you tried with the power source options available in your lappy?As mentioned by @AlexisLeclerc – joey rohan Sep 04 '14 at 12:58
  • I have yes, I've increase the power management mode to 'prefer maximum performance' which I presume is what the post meant. My drivers are also up to date. EDIT: I've decided to choose overall max performance and that seemed to do the job. Thank you for all contributions. – Lukasz Medza Sep 04 '14 at 13:02

0 Answers0