Hello
I have question, I generate buttons, using the code bolow
Button but = null;
but = new Button (this,SWT.PUSH);
but.setText("Test="+a);
but.setBounds(new Rectangle(0, 0, 16, 16));
but.setLocation(10, 10);
but.setSize(100, 20);
but when I move this element over another example label, this button
is under the label, how to "bring to front" this button.
Lukasz
Andrew Thompson - 27 Apr 2007 03:27 GMT
...
>I have question, I generate buttons, using the code bolow
>
[quoted text clipped - 4 lines]
>but.setLocation(10, 10);
>but.setSize(100, 20);
Not that I know much about SWT, but this snippet
tells me very little..
>but when I move this element over another example label, this button
>is under the label, how to "bring to front" this button.
A quick Google for 'swt layout' suggests that SWT
uses the same basic mechanism as Swing and the
AWT to layout components, and that is 'layouts'.
I am guessing (for want of more code) that the code
is not using a layout to calculate the appropriate size
and position of components, and that is the fundamental
source of the problem.
The solution it to use a layout.

Signature
Andrew Thompson
http://www.athompson.info/andrew/