Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8187317
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T02:31:16+00:00 2026-06-07T02:31:16+00:00

First I should note that my dual monitors are in custom position rather than

  • 0

First I should note that my dual monitors are in custom position rather than the default left-to-right.

I was attempting to create a full-screen exclusive mode game, but in testing I noticed that when I used EXIT_ON_CLOSE (and in System.exit), that the monitor setup would be reset to the default left-to-right. But when I used DISPOSE_ON_CLOSE (and for just a dispose()) it would be perfectly normal when returning to my desktop. Is this acceptable practice, or is there something I’m missing?

Relevant part:

import java.awt.GraphicsDevice;
import java.awt.GraphicsEnvironment;
import javax.swing.JFrame;
import javax.swing.JLabel;

public class FullScreenTest extends JFrame {

    public FullScreenTest() {
        GraphicsDevice screen = GraphicsEnvironment.
              getLocalGraphicsEnvironment().getDefaultScreenDevice();
        add(new JLabel("Test"));
        setDefaultCloseOperation(EXIT_ON_CLOSE);

        screen.setFullScreenWindow(this);
    }

    public static void main(String[] args) {
        FullScreenTest test = new FullScreenTest();
    }
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T02:31:19+00:00Added an answer on June 7, 2026 at 2:31 am

    But when I used DISPOSE_ON_CLOSE (and for just a dispose()) it would be perfectly normal when returning to my desktop

    That is good. Stick with it. Many developers use EXIT_ON_CLOSE when it is entirely unnecessary.

    If DISPOSE_ON_CLOSE does not work to end the JRE, it means that other GUI elements are still visible, or other non-daemon threads are running. In that case, it would generally be better to explicitly end the other threads, or check they can safely be ended.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Why is it that both outs are printing 84? The first one should read
First off I should say that I don't have any experience in working with
First, I should say that I am a beginner in terms of XSLT. Although
I'd like to build an app that has 2 windows. The first one should
First you should know I have looked into many questions and none of them
Maybe I should first give an idea of what I want to accomplish as
I would like to implement a simple AR desktop application. This application should first
The above expression is working fine. this expression means first leter should start with
I have created a file argument.pl which takes several arguments first of which should
string abc = 07:00 - 19:00 x = int.Parse(only first two characters) // should

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.