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 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?
Imagine you homebrew a custom gui framework that doesn't use windows handles (compact framework,
I'm stuck in .NET 2.0 Windows Forms. It doesn't look like the ability to
Is it correct-proper as in windows doesn't say it's bad or not recommended. For
As far as I've been able to find out, Windows doesn't offer an API
I have an issue where Swing (in Java 1.6, Windows) doesn't seem to trigger
I have a python program that has no windows frame and doesn't show up
There doesn't appear to be a date-picker with the current beta Windows Phone 7
I'm getting random crashes from my c# app (Windows 7/VS2008), and it doesn't give
I'm trying to get a Windows Mobile 5 PDA to give me its location.

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.