title: java & fullscreen over multiple monitors
body: <p>A snippet from my Java application:</p>
  
  <pre><code> JFrame f = new JFrame();
   GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
   GraphicsDevice gd = ge.getDefaultScreenDevice();
   gd.setFullScreenWindow(f);
  </code></pre>
  
  <p>So what it does is make it self fullscreen. Now the odd thing is that the program is fullscreen but only on one monitor!
  E.g. I have a windows vista system with two screens that are combined in one desktop.
  What to do automatically let it go fullscreen over all monitors?</p>
  
  <hr>
  
  <p>Ok I tried that:</p>
  
  <pre><code>import java.awt.image.ColorModel;
  import java.awt.GraphicsConfiguration;
  import java.awt.GraphicsDevice;
  import java.awt.GraphicsEnvironment;
  import java.awt.Rectangle;
  
  class grdevs
  {
      public static void main(String [] args)
      {
          GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
          GraphicsDevice[] gs = ge.getScreenDevices();
          for(GraphicsDevice curGs : gs)
          {
              GraphicsConfiguration[] gc = curGs.getConfigurations();
              for(GraphicsConfiguration curGc : gc)
              {
                  Rectangle bounds = curGc.getBounds();
                  ColorModel cm = curGc.getColorModel();
  
                  System.out.println("" + bounds.getX() + "," + bounds.getY() + " " + bounds.getWidth() + "x" + bounds.getHeight() + " " + cm);
              }
          } 
      }
  }
  </code></pre>
  
  <p>but it gives:</p>
  
  <pre><code>0.0,0.0 1024.0x768.0 DirectColorModel: rmask=ff0000 gmask=ff00 bmask=ff amask=0
  0.0,0.0 1024.0x768.0 DirectColorModel: rmask=ff0000 gmask=ff00 bmask=ff amask=0
  0.0,0.0 1024.0x768.0 DirectColorModel: rmask=ff0000 gmask=ff00 bmask=ff amask=0
  0.0,0.0 1024.0x768.0 DirectColorModel: rmask=ff0000 gmask=ff00 bmask=ff amask=0
  0.0,0.0 1024.0x768.0 DirectColorModel: rmask=ff0000 gmask=ff00 bmask=ff amask=0
  0.0,0.0 1024.0x768.0 DirectColorModel: rmask=ff0000 gmask=ff00 bmask=ff amask=0
  1024.0,0.0 1024.0x768.0 DirectColorModel: rmask=ff0000 gmask=ff00 bmask=ff amask=0
  1024.0,0.0 1024.0x768.0 DirectColorModel: rmask=ff0000 gmask=ff00 bmask=ff amask=0
  1024.0,0.0 1024.0x768.0 DirectColorModel: rmask=ff0000 gmask=ff00 bmask=ff amask=0
  1024.0,0.0 1024.0x768.0 DirectColorModel: rmask=ff0000 gmask=ff00 bmask=ff amask=0
  1024.0,0.0 1024.0x768.0 DirectColorModel: rmask=ff0000 gmask=ff00 bmask=ff amask=0
  1024.0,0.0 1024.0x768.0 DirectColorModel: rmask=ff0000 gmask=ff00 bmask=ff amask=0
  </code></pre>
  
  <p>E.g I would expect a device capable of 2048x768 as they are combined in one (I clicked on "extend desktop").</p>