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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T22:55:25+00:00 2026-05-23T22:55:25+00:00

I created java GUI using myEclipse Matisse. when my Screen Resolution is 1024×768 it

  • 0

I created java GUI using myEclipse Matisse. when my Screen Resolution is 1024×768 it works fine but when i change resolution my GUI is not working fine. I want my GUI window should be re-sized according to the screen Resolution
I am extending JFrame to create the main window.

public class MyClass extends JFrame {

    //I am putting some controls here.

    Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
    setBounds(0,0,screenSize.width, screenSize.height);
    setVisible(true);

    pack();
}

this is not working, what ever i do, setting size hardcoded or by ToolKit using, the Frame Size Remains same.

  • 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-23T22:55:26+00:00Added an answer on May 23, 2026 at 10:55 pm

    You are calling pack() which changes the frame size so it just fits the components inside. That’s why it is shrinking back I think. Remove the pack() line and it should work.

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

Sidebar

Related Questions

I've created a Java EE application using a set of libraries. Works like a
I have created one GUI using Swing of Java. I have to now set
I have created a GUI in Java using swings with the help of Netbeans
I am trying to create a java gui using netbeans but the swing panels
I am trying to create my first GUI application using (Java + Eclipse +
I have created a fairly substantial Java GUI application with many form windows where
I created a Swing GUI using netbeans, and when I try to manually do
I have GUI created using netbeans GUI builder. I want to add there an
I have just started with Gui Programming in netbeans (Using the template Java Desktop
I have a GUI window that I've created using Netbeans. I then ported the

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.