java - LWJGL + Swing crashing -


i trying add lwjgl display jframe. added lwjgl canvas. after move complete window or alt-tab out, window freezes.

private jpanel contentpane;  public guijgen() {     setresizable(false);     setbounds(100, 100, 1200, 800);     contentpane = new jpanel(null);     setcontentpane(contentpane);      // model-viewer     jpanel panel_model = new jpanel();     panel_model.setbounds(0, 0, 771, 761);     contentpane.add(panel_model);     panel_model.setlayout(null);      guimodelcanvas canvas = new guimodelcanvas();     canvas.setbounds(10, 11, 751, 591);     canvas.setbackground(color.blue);     canvas.requestfocusinwindow();     canvas.setfocusable(true);     canvas.setignorerepaint(true);     panel_model.add(canvas);     this.setvisible(true);     try {         display.setdisplaymode(new displaymode(751,591));         display.setparent(canvas);         display.create();     } catch (lwjglexception ex) {         ex.printstacktrace();     } } 

i left important code , removed rest. why crashing? in advance!


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - Bypass Geo Redirect for specific directories -

php - .htaccess mod_rewrite for dynamic url which has domain names -