0

How i do the java programn open in fullscream? Using jframe..

i only see in the internet peoples saiys to use resizable false...

1st Aug 2017, 7:09 PM
Anderson Felipe Schwartz de Lima
Anderson Felipe Schwartz de Lima - avatar
5 odpowiedzi
+ 1
There are better ways of doing it and with much simplicity and efficiency but thus code I wrote should make you understand how to proceed. Also, if there are any errors, I apologize in advance. I wrote them directly in soloLearn and couldn't test the code myself https://code.sololearn.com/c9ALMEBudymR/?ref=app
8th Sep 2017, 2:55 PM
Rik Roy
Rik Roy - avatar
+ 3
you have to scale the images and the content according to the screen size. If you use maximize_both of a jFrame, the window's height and width will be different everytime depending on the user's system resolution To eliminate this problem, you should launch the program with a certain screen size in mind (say 800×600) and after maximizing it, divide the final width and height of the jFrame with the assumed screen size. Thus, u will get an aspect Ratio for x and y. Multiply this ratio with the images and UI's width and heights and you are done
1st Sep 2017, 2:38 PM
Rik Roy
Rik Roy - avatar
+ 2
create a jFrame. name it frame and write this frame.setExtendedState(JFrame.MAXIMIZED_BOTH ); frame.setVisible(true); it should do the trick
2nd Aug 2017, 8:47 PM
Rik Roy
Rik Roy - avatar
0
Thanks! my english isn't very good, so .. let me try... my real problemn , is about all things on de Window, the Window open in full scream, but the button or img, instead of be maximize together of window, they stay short... i hope that u can understand...
1st Sep 2017, 1:39 PM
Anderson Felipe Schwartz de Lima
Anderson Felipe Schwartz de Lima - avatar
0
Tnks! But.. how can i do it? I'm think in study more Java...I'm beginner. ..
7th Sep 2017, 1:30 AM
Anderson Felipe Schwartz de Lima
Anderson Felipe Schwartz de Lima - avatar