VirtualBox

Opened 13 years ago

Last modified 8 years ago

#9837 closed defect

Java's GraphicsDevice.setFullScreenWindow fails — at Initial Version

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

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);
  }
}

Change History (1)

by Hollis Waite, 13 years ago

Attachment: full screen.png added

Full screen Java window

Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use