I've got a JFrame object which is 1280 by 768 (i may change it to 1024 by 768 in the future)..
I am making the window full screen by calling this line of code:
GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice().setFullScreenWindow(window);
(While 'window' is my JFrame object)
I could see that the screen appears to be fullscreen, which is works very good for me, but if i'll draw a string just like that:
g.drawString("Test!!!",100,100);
I could still see that the window is not scaled to the resolution of the JFrame.. (because the string is drawn on the 100x100 point of my screen which is 1920x1080)
I have also tried using a new display mode:
DisplayMode display = new DisplayMode(1280, 768, 16, DisplayMode.REFRESH_RATE_UNKNOWN);
GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice().setDisplayMode(display);
But i keep getting UnsupportedOperationException:
Exception in thread "Thread-2" java.lang.UnsupportedOperationException: Cannot change display mode
What is that? is my monitor not supporting changing display mode? or it is just a wrong way of doing that?..