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 4034512
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T11:58:53+00:00 2026-05-20T11:58:53+00:00

Windows doesn’t support myFrame.setExtendedState(JFrame.MAXIMIZED_VERT); . So I tried to get the screen size and

  • 0

Windows doesn’t support myFrame.setExtendedState(JFrame.MAXIMIZED_VERT);.

So I tried to get the screen size and made the JFrames height as big as the screens height. But then it covers the Windows taskbar.

Is there any other way to maximize my JFrame vertcially?

Thanks,

esanits

  • 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-05-20T11:58:54+00:00Added an answer on May 20, 2026 at 11:58 am

    Here is one way to get basic info about the window and the frame:

    import java.awt.*;
    import javax.swing.*;
    
    public class FrameInfo
    {
        public static void main(String[] args)
        {
            String laf = "javax.swing.plaf.metal.MetalLookAndFeel";
    //        laf = "com.sun.java.swing.plaf.windows.WindowsLookAndFeel";
    //        laf = "com.sun.java.swing.plaf.motif.MotifLookAndFeel";
    
    //        try { UIManager.setLookAndFeel( laf ); }
    //        catch (Exception e) { System.out.println(e); }
    //        JFrame.setDefaultLookAndFeelDecorated(true);
    
            GraphicsEnvironment env = GraphicsEnvironment.getLocalGraphicsEnvironment();
            Rectangle bounds = env.getMaximumWindowBounds();
            System.out.println("Screen Bounds: " + bounds );
    
            GraphicsDevice screen = env.getDefaultScreenDevice();
            GraphicsConfiguration config = screen.getDefaultConfiguration();
            System.out.println("Screen Size  : " + config.getBounds());
            System.out.println(Toolkit.getDefaultToolkit().getScreenSize());
    
            JFrame frame = new JFrame("Frame Info");
            System.out.println("Frame Insets : " + frame.getInsets() );
    
            frame.setSize(200, 200);
    //        frame.pack();
            System.out.println("Frame Insets : " + frame.getInsets() );
            frame.setVisible( true );
    
            System.out.println("Frame Size   : " + frame.getSize() );
            System.out.println("Frame Insets : " + frame.getInsets() );
            System.out.println("Content Size : " + frame.getContentPane().getSize() );
         }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Since Windows doesn't support label in file attributes, will this information be ripped off?
The following query works on Oracle 10.2.0.1.0 on windows,but doesn't work on Oracle 10.2.0.2.0
I'm trying to compile beej's guide to network programming examples, but Windows XP doesn't
This code works for windows 7 but doesn't work for windows XP (outputs only
There is a blog post on Why Windows Mobile's X button doesn't close the
For some reason the following code doesn't work on Windows XP. new URL(file:// +
I have a printer that doesn't have the driver for my windows server 2008,
I have some older code that doesn't appear to work on 64bit Windows 7.
I am trying to install Android SDK on windows 7 64-bit but it doesn't
Is it correct-proper as in windows doesn't say it's bad or not recommended. For

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.