aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes advanced SWT sample code Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "advanced SWT sample code" Watch "advanced SWT sample code" New topic
Author

advanced SWT sample code

Andreas Mai
Greenhorn

Joined: May 30, 2006
Posts: 1
Hi,

I'm new to SWT (and to this forum, too)...

Looking for some advanced SWT application with source code which I can use to study best practices. I haven't found any real useful stuff so far on the web.

What I'm actually trying to do is to invoke a custom dialog box from the main window to set some "properties", put these properties in a class and then pass them back to the main window (which then in turn should perfom some action on these properties...)

Again, any advanced sample code would be really great (something which goes a bit beyond the typical "Hello World" stuff) ;-)

many thanks.
A.

btw: does anyone knows a good GUI builder for SWT? (open source, if possible...I'm using this only for private use...) I'm currently playing around with VE but maybe there's some more advances stuff available already...
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 39409
    
  28
Welcome to the Ranch.

I have never used SWT myself. I don't know of any "best practice" code for a full-size application.

I presume you have been through the part of the Java tutorial about Swing GUIs? [Note there are several people on the Ranch, myself included, who disagree with the use of addActionListener(this); in Java, even though the Tutorial uses it passim.]

You will find instructions about Swing in any of the larger Java textbooks, but it tends to be in bits:-
  • Example of how to set up a JFrame
  • Example of how to add a JPanel
  • Example of how to draw a circle on your JPanel
  • etc etc.
  • The Java tutorial also teaches in bits like that. So you would have to go through the many bits and put them all together.

    There is supposed to be a GUI palette NetBeans, but I have never actually worked out how to use it. If you go to the Java Sun Developers' Network website, they are offering Studio Creator at a special reduced price of $0.00(!). I don't know, but that might be what you are looking for.

    CR
     
     
    subject: advanced SWT sample code