Results 1 to 3 of 3
  1. #1
    chakribobby is offline Member
    Join Date
    Jun 2010
    Posts
    4
    Rep Power
    0

    Default how to restrict the size of the window in swt

    Hi
    using the below code i am able to set the size of the window but i am able to increase and decrease the size of the window using the mouse

    is it possible to restrict the size so that it can not be decrease after some limit.

    public class SWTApp {


    public SWTApp(Display display) {

    Shell shell = new Shell(display);
    shell.setText("Center");
    shell.setSize(250, 200);
    shell.open();

    while (!shell.isDisposed()) {
    if (!display.readAndDispatch()) {
    display.sleep();
    }
    }
    }
    public static void main(String[] args) {
    Display display = new Display();
    new SWTApp(display);
    display.dispose();
    }
    }
    thanks in advance

  2. #2
    jagadeesh is offline Member
    Join Date
    Jun 2010
    Posts
    3
    Rep Power
    0

    Default

    you can use setMinimumSize functionality.

    shell.setMinimumSize(int,int);
    Last edited by jagadeesh; 06-09-2010 at 02:49 PM.

  3. #3
    chakribobby is offline Member
    Join Date
    Jun 2010
    Posts
    4
    Rep Power
    0

Similar Threads

  1. How restrict TextArea that it only contain stirngs
    By Basit781 in forum CLDC and MIDP
    Replies: 3
    Last Post: 05-25-2010, 12:59 PM
  2. Replies: 22
    Last Post: 05-19-2010, 02:00 PM
  3. run last class in full size window
    By sonny in forum Eclipse
    Replies: 0
    Last Post: 03-05-2010, 02:56 PM
  4. How to restrict the url accessing
    By jazz2k8 in forum Advanced Java
    Replies: 9
    Last Post: 05-25-2009, 12:59 PM
  5. Replies: 1
    Last Post: 06-06-2008, 07:55 AM

Posting Permissions

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