VirtualBox

Ticket #9837 (new defect)

Opened 2 years ago

Last modified 2 years ago

Java's GraphicsDevice.setFullScreenWindow fails

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

Description

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

full screen.png Download (121.2 KB) - added by hwaite 2 years ago.
Full screen Java window

Change History

Changed 2 years ago by hwaite

Full screen Java window

comment:1 Changed 2 years ago by Hollis Waite

Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use