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
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!