• Post Reply Bookmark Topic Watch Topic
  • New Topic

advanced SWT sample code  RSS feed

Andreas Mai
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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.

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
Posts: 55351
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

    Don't get me started about those stupid light bulbs.
    • Post Reply Bookmark Topic Watch Topic
    • New Topic
    Boost this thread!