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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T07:35:43+00:00 2026-05-27T07:35:43+00:00

I am trying to match the following while implementing a GridBagLayout. The GBL is

  • 0

I am trying to match the following

image pane

while implementing a GridBagLayout. The GBL is the only way I know i can get the different sized elements. I know I can do something like the above picture but I don’t know how to do it with GBL. I am also ready to take suggestions on a better idea.

  • 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-27T07:35:44+00:00Added an answer on May 27, 2026 at 7:35 am

    Player GUI

    import java.awt.*;
    import javax.swing.*;
    import javax.swing.border.*;
    
    class PlayerGui {
    
        public static void main(String[] args) {
            JPanel gui = new JPanel(new BorderLayout());
            gui.setBorder(new BevelBorder(BevelBorder.RAISED));
    
            JPanel north = new JPanel(new GridLayout(0,1,5,5));
            north.add(new JLabel("Player Name", SwingConstants.CENTER));
    
            JPanel tfConstrain = new JPanel(new FlowLayout(FlowLayout.CENTER));
            tfConstrain.add(new JTextField(18));
    
            north.add(tfConstrain);
    
            gui.add(north, BorderLayout.NORTH);
    
            JPanel center = new JPanel(new GridLayout(0,1,10,10));
            center.add(new JButton("On This Machine"));
            center.add(new JButton("Netowrk Based"));
            center.add(new JButton("Main Menu"));
            center.setBorder(new EmptyBorder(40,70,40,70));
    
            gui.add(center, BorderLayout.CENTER);
    
            JOptionPane.showMessageDialog(null, gui);
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to match the following items in the string pcode : u followed
Im trying to match forum_id with several different forum_id's, something like forum_id = 5,7,12,43,63,78
I'm trying to match elements with a name that is 'container1$container2$chkChecked' , using a
I'm trying to create a regex pattern to match the lines in the following
I am trying to add the following method to the Math class in Ruby
I'm following this guide: http://www.math.umd.edu/~dcarrera/ruby/0.3/chp_01/programs.html and I'm trying to create my first ruby program.
I am trying to match floating-point decimal numbers with a regular expression. There may
I'm trying to match the parts of a version number (Major.Minor.Build.Revision) with C# regular
I am trying to match multiple CSS style code blocks in a HTML document.
I'm trying to match SHA1's in generic text with a regular expression. Ideally I

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.