Results 1 to 3 of 3
  1. #1
    rasen58 is offline Member
    Join Date
    Oct 2012
    Posts
    15
    Rep Power
    0

    Default Stop buttons from resizing based on test size

    I have buttons where there is no text in the beginning, but when they are click on, I edit their text.
    However, I want the size to always be the same, even when there is no text in them.
    How do I do that?

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,237
    Rep Power
    19

    Default Re: Stop buttons from resizing based on test size

    By using an appropriate layout manager. GridLayout and GridBagLayout (with appropriate constraints) come to mind.

    To get better help sooner, post a SSCCE (Short, Self Contained, Correct (Compilable), Example) that demonstrates the problem.

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  3. #3
    rasen58 is offline Member
    Join Date
    Oct 2012
    Posts
    15
    Rep Power
    0

    Default Re: Stop buttons from resizing based on test size

    Ok I used gridbag and it worked. Thanks

Similar Threads

  1. Resizing a Table as per the dialogue size
    By deepali in forum New To Java
    Replies: 4
    Last Post: 07-31-2012, 06:34 PM
  2. How to split a file by based on size
    By kewlkeny in forum New To Java
    Replies: 3
    Last Post: 01-05-2012, 11:07 AM
  3. Help with resizing Buttons in a grid
    By satanfx55 in forum AWT / Swing
    Replies: 6
    Last Post: 05-14-2011, 08:26 PM
  4. how to fix the size of buttons?
    By andyliteral in forum AWT / Swing
    Replies: 2
    Last Post: 03-23-2011, 03:49 PM
  5. Make all buttons the same size
    By Matthew1246 in forum AWT / Swing
    Replies: 3
    Last Post: 03-22-2011, 01:22 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •