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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T19:12:07+00:00 2026-06-08T19:12:07+00:00

In a bit of a panic. Been working on a project for the past

  • 0

In a bit of a panic. Been working on a project for the past two months. I changed a few of the box sizes a couple of days ago and saved it. Reloaded it this morning and the window size has gone stupidly small and I get the error:

Exception in thread "AWT-EventQueue-0" java.lang.IllegalStateException: javax.swing.JButton[,0,0,0x0,invalid,alignmentX=0.0,alignmentY=0.5,border=javax.swing.plaf.synth.SynthBorder@ce623f,flags=288,maximumSize=,minimumSize=,preferredSize=,defaultIcon=,disabledIcon=,disabledSelectedIcon=,margin=javax.swing.plaf.InsetsUIResource[top=0,left=0,bottom=0,right=0],paintBorder=true,paintFocus=true,pressedIcon=,rolloverEnabled=true,rolloverIcon=,rolloverSelectedIcon=,selectedIcon=,text=Search,defaultCapable=true] is not attached to a horizontal group

Any ideas??!?!?!?!

  • 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-08T19:12:09+00:00Added an answer on June 8, 2026 at 7:12 pm

    The error message says it all. You have a certain component (a JButton) which you have added to a vertical group but forgot to add it to a horizontal group as well in your GroupLayout. See the How to use GroupLayout part of the LayoutManager tutorial and the corresponding sample code

    layout.setHorizontalGroup(
       layout.createSequentialGroup()
          .addComponent(c1)
          .addComponent(c2)
          .addGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING)
               .addComponent(c3)
               .addComponent(c4))
    );
    layout.setVerticalGroup(
       layout.createSequentialGroup()
          .addGroup(layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
               .addComponent(c1)
               .addComponent(c2)
               .addComponent(c3))
          .addComponent(c4)
    );
    

    If you would remove the addComponent(c3) part from the first line you would receive a similar exception.

    Of course, without seeing your code I cannot pinpoint where exactly in your project you messed up, but a decent VCS-based diff tool to compare between those 2 versions should reveal this pretty quickly

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

Sidebar

Related Questions

Bit of background, I'm a total lisp noob, only started a few weeks ago,
Bit of a newbie when it comes to android, only been working on it
Bit by bit I've been converting a PHP web app I'm working on to
Bit of a strange problem here... I've got an update query that isn't working,
bit of an odd question here. If I have two separate objects, each with
Bit of an Objective-C rookie, I've looked around for an answer but haven't been
Bit of a weird one: I was told a while ago by a friend
Bit of an odd question, but I'm using sessions a lot in a project.
Harddrive bit-rot does happen . I'm using SQLite for a project with fairly critical
Bit of a puzzle for you.... I have a 730px wide, auto height div.

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.