The Artima Developer Community
Sponsored Link

Java Answers Forum
SWT

1 reply on 1 page. Most recent reply: Jun 23, 2004 3:10 AM by Pritam

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 1 reply on 1 page
joel

Posts: 1
Nickname: darfin
Registered: Jun, 2004

SWT Posted: Jun 18, 2004 10:36 AM
Reply to this message Reply
Advertisement
hello, im just learning to use the SWT with Eclipse. But im having a few problems with it.

heres my code:
Text read = new Text(shell, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
read.setSize(1,100);
read.setEditable(false);
read.setText("Read here");
read.setBackground(new Color(display,255,255,255));
  	
Text write = new Text(shell, SWT.BORDER);
write.setText("write here");
write.setBounds(10,10,200,20);


but my problem is, i need to relocate the two differnt box's on my shell and change the size, etc. but whenever i change those settings, it doesnt seem to change it (the setBounds() method) when i run it.
heres a picture here: http://darwin.dbspot.com/window.bmp of what i get

i need to know a way to move those boxes around and change their size. i have read an example that has a picture of what im trying to do, and i typed it in EXACTLY how it was, and mine turned out VERY differnt then the one in the picture of the example. it just throws the text boxes one here, then the one next to it, unless i scrunch it down a bit, then it just fits them all to the little screen.

i hope im making scence(sp?) im in a hurry and kindof rambling on, so if you dont under stand, just tell me and i'll revise it later when i have more time :)
thanks for any help.


Pritam

Posts: 1
Nickname: pritam
Registered: Jun, 2004

Re: SWT Posted: Jun 23, 2004 3:10 AM
Reply to this message Reply
We did some SWT development and it was understanding Gridbags and GridBagLayouts that was key to doing what you are trying to do. I can't give you more than that, but read the API docs on them.

Flat View: This topic has 1 reply on 1 page
Topic: How to invoke the debugger using JSP Previous Topic   Next Topic Topic: a doubt in chapter 5 of Bruce Eckel's Textbook

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use