Hi there. I have a problem to one my PC. Source code is correct. My problem is in graphic render. This bug only on one laptop. Example screens in 1 PC:
(screen in http://)
JLabel - i.gyazo.com/deafe8b111007562e47d93ab4f9728a3.png
JMenu - i.gyazo.com/1d5c5babd243d958073d2635f64b0e8a.png
JMenuItem - http://i.gyazo.com/aca39fd386d7d186c1f22bb2d629148e.png
JMenuItem - i.gyazo.com/d78f33834913e4548edf93f8bd996002.png
On other PC's there is no problems.: http://i.gyazo.com/51e9c928627d7091bbb302b5eb78b6a2.png
I thought that problem was in java JRE (I use v1.7) and I reinstalled it. But the problem remains. Also, I switched off Desktop Composition - but there is no luck either. What should I do now? Maybe the problem is in video driver or hardware acceleration? Tell me how to solve the problem?
[message edited]
Example "bug code":
public class Example extends JFrame {
private static final long serialVersionUID = 1L;
public Example(){
JMenuBar menuBar = new JMenuBar();
setJMenuBar(menuBar);
JMenu mnNewMenu = new JMenu("\u041C\u0435\u043D\u044E");
menuBar.add(mnNewMenu);
JMenuItem mntmNewMenuItem = new JMenuItem("\u0424\u0430\u0439\u043B");
mnNewMenu.add(mntmNewMenuItem);
JMenuItem mntmNewMenuItem_1 = new JMenuItem("\u0412\u044B\u0445\u043E\u0434");
mnNewMenu.add(mntmNewMenuItem_1);
}
public static void main(String[] args){
Example form = new Example();
form.setSize(640,480);
form.setLocationRelativeTo(null);
form.setVisible(true);
}
}
screen bug: i.gyazo.com/9fcf258e62c498f8468d47b7f73759e1.png
screen normal: i.gyazo.com/ec27e655a0209e4613c3a19863fa0e18.png
Ok, this problem solved!
From my PC, i added lines:
System.setProperty("sun.java2d.d3d", "false");
System.setProperty("sun.java2d.ddoffscreen","false");
System.setProperty("sun.java2d.noddraw", "true");
This video driver error.