Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[platform-swt-dev] Creating a form in SWT

It seems there is a lack of tutorials for SWT out there, at least
significantly less than the amazing Swing Tutorial. Anyways . . . I
was thinking of converting my partially developed app from Swing to
SWT. I'm currently spending my free time testing out SWT, however a
have an issue.


I currently have a class, lets say, "AppFrame"


which is something like:


public class AppFrame extends JFrame
{         public AppFrame(String title)         { 
super(title);


                // set-up components, etc etc         }


        // methods, etc etc


}

Now, this class is called from a main class, or perhaps other classes,
or perhaps another project. I know you can't subclass Shell in SWT.
What is the equivalent way to go about this in SWT.


I'm also on the fence about this approach versus creating an instance
of JFrame/Shell and doing whatnot that way . . . but my current
argument is that the Form's behaviour and set-up should be
encapsulated into itself.



Back to the top