How to listen for a change in java.awt.Window screen? Is there a way to give focus to other windows/programs whilst using setFullScreenWindow()? -
i have full screen window made this
graphicsenvironment ge = graphicsenvironment.getlocalgraphicsenvironment(); graphicsdevice[] gs = ge.getscreendevices(); if (gs.length >= 1) gs[1].setfullscreenwindow(frame); else gs[0].setfullscreenwindow(frame);
this puts frame on second monitor unless there no second monitor in case puts window on primary monitor
now problem can't seem find way push window , force loose focus other windows, dialogs , things such google chrome go in front of window -- problem if user starts program without secondary monitor plugged in or if secondary monitor gets unplugged (in both cases fullscreen window ends on primary display)
is there way give other windows, jframes or whatever needed focus above window? or there sort of listener don't know allow me dispose of fullscreen window in event gets moved primary display (i have tried implementing componentlistener in class extends window)?
setfillscreen
method used set program in "full screen exclusive mode", meaning, application has exclusive control on screen, , no other program's should rendered.
do want maximise window instead? in case should using frame#setextendedstate
, passing frame.maximized_both
you may want @ setundecorated
Comments
Post a Comment