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

  • SEARCH
  • Home
  • 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 8380461
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T16:27:52+00:00 2026-06-09T16:27:52+00:00

Recently I came across the fullscreen exclusive mode for Java. As I tried it

  • 0

Recently I came across the fullscreen exclusive mode for Java. As I tried it myself, I encountered something: Rendering the exactly same content in a JFrame or Frame in fullscreen mode takes significantly longer (40 fps), than in an undecorated and maximized window (150-200 fps).
My screen is set to 50 fps, that’s 20ms per frame and I can’t see, where this time is lost. My only idea is, that Jave – for some reason – decides to use my onboard graphicscard while in fullscreen.

GraphicsDevice gd = GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice();
if(gd.isFullScreenSupported()) {
    try {
        gd.setFullScreenWindow(window);
    } finally {
        gd.setFullScreenWindow(null);
    }
} else {
    this.fullscreen = false;
}

I manage repainting with a frame, that trys to hold the frame rate on a certain level by pausing a calculated time.

int delta = (int) (System.currentTimeMillis() - timestamp); //timestamp: start of this round
if(animated - delta > 0)
    pause(animated - delta);

And finally I draw on the frame using double buffering:

public void render(Graphics2D a) { //window graphics are passed
    Graphics2D g = (Graphics2D) backBuffer.getGraphics();
    //Adjusting some rendering hints here...
    //Then drawing some stuff...
    g.dispose();
    a.drawImage(backBuffer, 0, 0, null);
}

That’s basically it, and still: the so-called efficient fullscreen mode is damn slow.

  • 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-09T16:27:54+00:00Added an answer on June 9, 2026 at 4:27 pm

    Try setting the system property -Dsun.java2d.d3d=false as suggested here Why does my Java application run so slowly in full-screen mode? (and fine when windowed)

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

Sidebar

Related Questions

I recently came across some Java code that simply put some strings into a
I recently came across a piece of Java code with WeakReferences - I had
I recently came across some code that looks something like this: <head> <?php /*
I recently came across many sites showing a Google streetview in panoramic mode, like
I recently came across the Java DefaultMutableTreeNode class. I was wondering if there is
I recently came across Phonegap . Have anyone of you tried it. Its an
I recently came across a way to develop pluggable application modules when using ASP.NET
i recently came across an exciting jquery plugin for image overlays http://jobyj.in/adipoli/ it says
I recently came across this line in a PHP script: $_REQUEST['start_date']=$date; Is it allowed
I recently came across the following piece of code. It doesn't look valid because

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.