Click here to Skip to main content
14,420,966 members
Rate this:
Please Sign up or sign in to vote.
See more:
I want to set size of cells in gridlayout with properspacing using java swt?
Posted
Updated 8-Jan-12 23:48pm
Comments
[no name] 9-Jan-12 4:45am
   
Use Title-case while phrasing your statements.
Rate this:
Please Sign up or sign in to vote.

Solution 2

GridData oGridData = new GridData(SWT.LEFT, SWT.CENTER, true, false, 1,1);
oGridData.widthHint = 600; 
oGridData.heightHint = 300;
oComponent.setLayoutData(oGridData);


Try this.

also please check these links:

http://www.eclipse.org/swt/[^]

http://www.vogella.de/articles/SWT/article.html[^]

http://www.eclipsepluginsite.com/jface.html[^]
   
Comments
vicky patole 9-Jan-12 5:14am
   
how to use in my code given below.. container.setLayout(new GridLayout(1, true)); container.setLayoutData(new GridData(GridData.FILL_BOTH)); please check second line....where i hav set gridlayout data...
TorstenH. 9-Jan-12 7:46am
   
Stop. You should stop trying to pretend being a developer when you're not able to transfer those 4 lines into your code.
is it so hard to ? did you click any of the links I posted? read. learn. then implement.
vicky patole 9-Jan-12 22:28pm
   
thanks torstenh,,i did that..thanks a lot for code..and it succeed
vicky patole 9-Jan-12 23:48pm
   
and its not vary hard...actually i am bit busy ..so and dint check your code at that point of time..thanks again
Rate this:
Please Sign up or sign in to vote.

Solution 1

container.setLayout(new GridLayout(1, true));
container.setLayoutData(new GridData(GridData.FILL_BOTH));

so how would i do in this example?
   
v2
Comments
vicky patole 9-Jan-12 5:14am
   
how to use in my code given below..
container.setLayout(new GridLayout(1, true));
container.setLayoutData(new GridData(GridData.FILL_BOTH));
please check second line....where i hav set gridlayout data...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100