This week's book giveaway is in the Server-Side JavaScript and NodeJS forum.
We're giving away four copies of Micro Frontends in Action and have Michael Geers on-line!
See this thread for details.
Win a copy of Micro Frontends in Action this week in the Server-Side JavaScript and NodeJS forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

text box - GridBagLayout

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello! I am wondering how I can modify this code correctly so that the size of the text boxes are limited. I've set a size but when I compile and run the text boxes are all a uniform size. I think the problem is that the GridBagLayout I'm using forces them to size to the window but I'm not sure how to change that. Any help would be greatly appreciated! The code is below...

 
Ranch Hand
Posts: 1535
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
Brandi L Love
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks, now my text boxes are the size I want them to be! Now, though, the text boxes are all lining up on the right edge of the largest text boxes and I want them to line up on the left edge. I'm guessing this has something to to with



but I'm not sure how to fix it. I tried changing relative to west and that just screwed everything up.
 
Craig Wood
Ranch Hand
Posts: 1535
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not with what I tried to put up; one of us must have missed something.
Try this and let's see if we're on the same page.
reply
    Bookmark Topic Watch Topic
  • New Topic