java paint problem - black components

前端 未结 4 1093
遥遥无期
遥遥无期 2021-01-18 21:08

I am having a weird java problem - For some reason quite often when I open a dialog it becomes black. When I force a repaint (for example, draging it out and into the screen

相关标签:
4条回答
  • 2021-01-18 21:28

    After a recent ati driver update I got the black control problem (and it's 2013 to my greatest astonishment); what helped me was disabling 2d/d3d acceleration:

    java -Dsun.java2d.d3d=false -jar whatever.jar
    
    0 讨论(0)
  • 2021-01-18 21:41

    Generally every problem I've seen regarding java flickering, black windows etc was on an ATI card. Even I have the issue on HD3450 and Win7 64-bit.

    See also: https://superuser.com/questions/266332/flickering-java-application-gui-on-windows-7

    0 讨论(0)
  • 2021-01-18 21:46

    If the same code works in your friends computer, but not in yours, the problem is in your computer.

    But dont give up try a few things before you decide to uninstall windows:

    1- Make sure it does not work even if you use methods like repaint(), update or revalidate()

    2- At this point there has to be some issue related to compatibility.

    -Try updating windows

    -Also update to the latest java version

    3- Keep searching for your answer here is another question with a similar problem Java applications with Windows 7 - are there compatibility concerns?

    4- Maybe the reason is windows 7. I have some college from college that are had similar issues in a programming subject in their laptops with windows 7(64bit). Some of them now use XP and others use Vista, and they don't have those kind of problems.

    Good luck!

    0 讨论(0)
  • 2021-01-18 21:48

    Happened to me on my ATI Radeon HD 5670 with Windows 7 64-bit.

    The solution was to use the Catalyst Control Center, and turn the Antialiasing and Anisotropic filtering to "Use Application Settings" instead of the default "Override Application Settings".

    This effectively turns off these features on your Java applications, and no more black screen!

    0 讨论(0)
提交回复
热议问题