• Post Reply Bookmark Topic Watch Topic
  • New Topic

Swing or SWT? (like this is new)

 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As things, like tools and documentation, are today, which would you rather be developing with, Swing or SWT? Why?
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
(I'll just converse with myself, then...)

From what I've experienced, I'd lean towards Swing development, because the tools and documentation I've seen for it are better and more abundant than those I've seen for SWT.

I'd lean towards SWT, because the SWT GUIs I've used respond faster than Swing GUIs, and the native (to Windows, at least) look-and-feel seems to be accepted better amongst non-technical users, who seem to balk at Swing at first use (though I've never seen any official study to suggest this, it coincides with my limited experience).

I'd lean away from Swing, because I never enjoy the constraints of the grid bag.

I'd lean away from SWT, because I'm not familiar with how well it does in a non-Windows environment (and I don't know anybody with a Mac that I can try out to see how I think things work and feel on it). Of course, I fully appreciate that my concerns about SWT might quickly be overcome by reading a good book on the subject.
 
Jez Nicholson
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'd lean towards SWT because i'm a control freak and I want to do my own garbage collection

Seriously though, if you are creating an Eclipse-based tool SWT might be the only option.
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Jeremy Nicholson:
I'd lean towards SWT because i'm a control freak and I want to do my own garbage collection

Seriously though, if you are creating an Eclipse-based tool SWT might be the only option.


But if you are programming in Java, is one of the reasons to not have to worry about GC? Otherwise, program in C++, right?

If I have a preference, right now, I would choose Swing. Why? Because I know it better than I know SWT. However, I have a copy of DGT SWT and JFace, so who knows, maybe that will change when I get a chance to really get into SWT.

A few things to note that I like about SWT/JFace in no particular order:

  • Native Widgets - Performance is just a bit better and you get the default OS File Chooser, Font Chooser, and Color Chooser. Swing's File and Color Chooser are pretty ugly and there is no Font Chooser.
  • JFace is a nice wrapper around SWT. Swing needs something like this for rapid development.
  • I like the way you change some of the properties on a widget in SWT better by passing the constructor INT's (SWT.BORDER | SWT.WRAP)


  • Aside from that, Swing is the ultimate GUI library, no matter what anyone says. You can pretty much make any widget do what you want or create a custom widget. Something that is not very easy in SWT since it's tied in to native calls.
     
    Ranganath Ranganaths
    Ranch Hand
    Posts: 32
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Hello i was just looking at the conversation ..N i am quite new to this java N i am learning swings from past 2 years .. N i wanted to know whts swt N how does it differ from Swings or Awt.. i just wanted to know wht is swt N does it have other Api.. i am aware of it .. can anyone let me in detail please..

    Thanking you
    Ranganath.S
     
    Don Kiddick
    Ranch Hand
    Posts: 580
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    I'm a swing man and I've never used SWT so I can't give an opinion on that. My view on Swing (as Gregg says) is that it is very powerful. I think there is a trade-off between power and complexity, and this is Swing's main drawback - it's not easy to use for the beginner. To do all but the simplest things you need to get relatively involved. However there are very good resources freely available on the web.
    A lot of people seem to think Swing apps are slow and this is often touted as its main drawback. I've never experienced this problem.
    If your users baulk at the metal look & feel, you can always use the windows l&f...your users wont notice.
    D.
     
    • Post Reply Bookmark Topic Watch Topic
    • New Topic
    Boost this thread!