Results 1 to 3 of 3
- 06-09-2010, 02:37 PM #1
Member
- Join Date
- Jun 2010
- Posts
- 4
- Rep Power
- 0
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
- 06-09-2010, 02:47 PM #2
Member
- Join Date
- Jun 2010
- Posts
- 3
- Rep Power
- 0
you can use setMinimumSize functionality.
shell.setMinimumSize(int,int);Last edited by jagadeesh; 06-09-2010 at 02:49 PM.
- 06-09-2010, 03:31 PM #3
Member
- Join Date
- Jun 2010
- Posts
- 4
- Rep Power
- 0
Similar Threads
-
How restrict TextArea that it only contain stirngs
By Basit781 in forum CLDC and MIDPReplies: 3Last Post: 05-25-2010, 12:59 PM -
Components not appearing until hover over or altering size of window
By goffy in forum New To JavaReplies: 22Last Post: 05-19-2010, 02:00 PM -
run last class in full size window
By sonny in forum EclipseReplies: 0Last Post: 03-05-2010, 02:56 PM -
How to restrict the url accessing
By jazz2k8 in forum Advanced JavaReplies: 9Last Post: 05-25-2009, 12:59 PM -
How to resize the components with the change in the size of the window?
By shaunak kiwalkar in forum SWT / JFaceReplies: 1Last Post: 06-06-2008, 07:55 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks