Path: csiph.com!x330-a1.tempe.blueboxinc.net!feeder1.hal-mli.net!news.glorb.com!news-out.readnews.com!transit3.readnews.com!news-out.news.tds.net!newsreading01.news.tds.net!86597e80!not-for-mail From: "Andrew Thompson" Subject: Re: Problem with SWT - "B Message-ID: <714eddfbdec59@uwe> X-Comment-To: comp.lang.java.gui Newsgroups: comp.lang.java.gui In-Reply-To: <1177594352.493638.96580@r35g2000prh.googlegroups.com> References: <1177594352.493638.96580@r35g2000prh.googlegroups.com> Content-Type: text/plain; charset=IBM437 Content-Transfer-Encoding: 8bit X-Gateway: time.synchro.net [Synchronet 3.15a-Win32 NewsLink 1.92] Lines: 40 Date: Wed, 27 Apr 2011 15:33:57 GMT NNTP-Posting-Host: 96.60.20.240 X-Complaints-To: news@tds.net X-Trace: newsreading01.news.tds.net 1303918437 96.60.20.240 (Wed, 27 Apr 2011 10:33:57 CDT) NNTP-Posting-Date: Wed, 27 Apr 2011 10:33:57 CDT Organization: TDS.net Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.gui:1548 To: comp.lang.java.gui lukasz.konkel@gmail.com wrote: .. >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); 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. -- Andrew Thompson http://www.athompson.info/andrew/ Message posted via JavaKB.com http://www.javakb.com/Uwe/Forums.aspx/java-gui/200704/1 --- * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet! --- Synchronet 3.15a-Win32 NewsLink 1.92 Time Warp of the Future BBS - telnet://time.synchro.net:24