VirtualBox

Opened 12 years ago

Closed 8 years ago

#9837 closed defect (obsolete)

Java's GraphicsDevice.setFullScreenWindow fails

Reported by: Hollis Waite Owned by:
Component: guest additions Version: VirtualBox 4.1.4
Keywords: java unity ubuntu Cc:
Guest type: Linux Host type: Windows

Description (last modified by aeichner)

When Guest Additions are installed on an Ubuntu guest VM running Unity, Java's GraphicsDevice.setFullScreenWindow(Window) fails to obscure the Unity panel.

import javax.swing.*;
import java.awt.*;

public class Test {
  public static void main(String[] args) {
    final JFrame f = new JFrame();
    f.setUndecorated(true);
    f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    f.pack();
    final GraphicsDevice device =
     GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice();
    System.out.println(device.isFullScreenSupported());
    System.out.println(device.getDefaultConfiguration().getBounds().getSize());
    device.setFullScreenWindow(f);
    f.setVisible(true);
  }
}

Attachments (1)

full screen.png (121.2 KB ) - added by Hollis Waite 12 years ago.
Full screen Java window

Download all attachments as: .zip

Change History (3)

by Hollis Waite, 12 years ago

Attachment: full screen.png added

Full screen Java window

comment:2 by aeichner, 8 years ago

Description: modified (diff)
Resolution: obsolete
Status: newclosed

Please reopen if still relevant with a recent VirtualBox release.

Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use