swing - OpenSuse 12.3 + Java Dual Display -


i have java application displays 2 jframes on 2 separate monitors. on ubuntu , windows application displays fine. can configure jframes display on monitors specified screen id. on opensuse keeps displaying on same monitor regardless of setting. different opensuse?

here of code use determine on monitor jframe must display:

     graphicsdevice[] screens = graphicsenvironment.getlocalgraphicsenvironment().getscreendevices();     (int s = 0; s < screens.length; s++) {         graphicsconfiguration configuration = null;         (int c = 0; c < screens[s].getconfigurations().length; c++) {             if (awtutilities.istranslucencycapable(screens[s].getconfigurations()[c])) {                 configuration = screens[s].getconfigurations()[c];                 break;             }         }         if (configuration == null) {             configuration = screens[s].getdefaultconfiguration();         }         if (screens[s].getidstring().equals[frame1_id]) {             frame1 = new jframe("frame 1", configuration);             frame1.setresizable(false);             frame1.setundecorated(true);             frame1.setbounds(configuration.getbounds());             frame1.setvisible(true);         }         if (screens[s].getidstring().equals[frame2_id]) {             frame2 = new jframe("frame 2", configuration);             frame2.setresizable(false);             frame2.setundecorated(true);             frame2.setbounds(configuration.getbounds());             frame2.setvisible(true);         }     } 

the opensuse implementation of graphicsenvironment may depend on choice of particular window manager. you'll have experiment find optimal one.

addendum: @bouncer comments, "i have used gnome window manager, caused problem. after switching kde, problem solved." see 10 things after installing opensuse 12.3.


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -