lwjgl Display remove title bar?

Hey!

I have a simple question. Is it possible to remove title bar and decoration around lwjgl openGL display when using windowed mode?

similar to JFrame maybe:


JFrame frame = new JFrame("something");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setSize(width,height);
frame.setUndecorated(true));  //here
frame.setVisible(true);

Unfortunately no, at least…not yet :slight_smile:

Try submitting it as an RFE on LWJGL forums!

Take a java.awt.Window, put a java.awt.Canvas in it and use Display.setParent(…) to bind your surface to the canvas.

-Dorg.lwjgl.opengl.Window.undecorated=true ?

Nice, when will it be part of the API?

I’ve returned to this project, and made it work. But now I want to know how does resizing of the window work (Display.getWidth or JFrame.getWidth())? If I render something on screen with opengl (I use Display.getWidth/2 to render 2D in center) and then resize this screen everything moves out of place (aspect ratio messes up, before I used Display.wasResized() to renew ratio on gluPerspective). I tryed to use Frame.getWidth() and getHeight() but I get same result. I want to know how are display and jframe connected exactly.

sry for my typing, i need to get some sleep.

parent code:


        Canvas = new Canvas();
        Frame = new JFrame("sup");

        Frame.setSize(1280, 720);
        Frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        Frame.setBackground(Color.BLACK);
        Canvas.setBackground(Color.BLACK);
        Frame.getContentPane().add(Canvas);
        Frame.setLocationRelativeTo(null);
        Frame.setVisible(true);
		try {
			Display.setVSyncEnabled(true);
			Display.setParent(Canvas);
			Display.create();
		} catch (Exception e) {
			e.printStackTrace();
			Display.destroy();
			System.exit(0);
		}