[LWJGL] Display Mode Problem

I’m trying to make a basic display in LWJGL and it gets an error

Exception in thread "main" java.lang.Error: Unresolved compilation problems: 
	The method setDisplayMode(org.lwjgl.opengl.DisplayMode) in the type Display is not applicable for the arguments (java.awt.DisplayMode)
	The constructor DisplayMode(int, int) is undefined

This is all I have in my code.

import java.awt.DisplayMode;

import org.lwjgl.opengl.Display;




public class MAin {
	
	public MAin() {
		try {// It makes me add 4 arguments
			Display.setDisplayModeAndFullscreen(new DisplayMode(500, 500));
			Display.setTitle("GAME");
			Display.create();
		} catch (LWJGLException e) {
			
			e.printStackTrace();
		}
	}

	
	public static void main(String []args) {
		new MAin();
	}
}

You’re trying to give it a java.awt.DisplayMode, it needs a org.lwjgl.opengl.DisplayMode

Oh, I even told myself to check the imports, ill give it another try

Wow, I was sure I had the right imports. same mistake, but thanks

Tip: you shouldn’t need it often, but it is valid code to write the full specified name of a type, it can prove useful when you need things that have the same name:


java.awt.DisplayMode jDM = new java.awt.DisplayMode(...);

org.lwjgl.opengl.DisplayMode lDM = new org.lwjgl.opengl.DisplayMode(...);

Mister code it, what IDE are you using, if any? I’m pretty sure any legit IDE would highlight that part of the code as an error, because it would be type mismatch or something.

Also probably all the IDEs do the imports for you.