Results 1 to 2 of 2
  1. #1
    Join Date
    May 2008
    Posts
    1
    Rep Power
    0

    Default How to resize the components with the change in the size of the window?

    Hello friends,
    I am new to SWT . Can anyone help me as to how to resize the components in the window(Textboxes, labels, buttons) with the change in the size of the original window?? I mean the user can change the size of the window using mouse and accordingly i want to change the size of the components inside it . Can anyone please help me with a sample code??

  2. #2
    pele's Avatar
    pele is offline Member
    Join Date
    Jun 2007
    Posts
    9
    Rep Power
    0

    Default

    try using

    gridData = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING|
    GridData.GRAB_HORIZONTAL|GridData.GRAB_VERTICAL);

    The GRAB_HORIZONTAL and GRAB_VERTICAL properties should solve ur problem.

Similar Threads

  1. How to change Window Icon
    By sharafat in forum AWT / Swing
    Replies: 7
    Last Post: 01-15-2010, 12:37 AM
  2. Replies: 1
    Last Post: 02-16-2008, 11:43 PM
  3. Listener for JFrame size change
    By Thez in forum AWT / Swing
    Replies: 10
    Last Post: 02-14-2008, 03:10 PM
  4. gridbaglayout: increase/decrease size of components.
    By newtojava7 in forum New To Java
    Replies: 2
    Last Post: 01-28-2008, 07:22 AM
  5. Resize frame
    By lenny in forum AWT / Swing
    Replies: 1
    Last Post: 07-29-2007, 11:18 PM

Posting Permissions

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