ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I'm fairly new to Java, having ignored it for the past eight years. However, I'm liking it for many different reasons, not the least of which is that my company is now implementing a new zSeries IBM server, which has gobs of power and a native JVM.
Anyway, for desktop development, I've been learning Swing/AWT. I've alraeady taken three univeristy courses in it. However, I cannot seem to get over the complexity of Swing when creating applications. I've been reading a lot about SWT and how beautiful it is compared to Swing.
Do any of you have experiences with Swing vs. SWT? I'd be curious to see how they compare and if one is better reocmmended for a given purpose than another.
Sorry j/k, haven't used SWT. I remember my older friend from school, was muttering some choice words about it though. Hes been programming Java for 6 years before he came to school this year, he seemed to be a bigger fan of the Swing/AWT way of doing things, but I figure if you spend a long time doing things one way, it might take alot to change from those ways. He really helped me with my Java and I was very impressed with some of the apps he'd written.
I just recently read a thread somewhere about this very thing but can't recall where...
It may have been here: http://www.osnews.com/story.php?news_id=10433 but the link on that page no longer works. Hmm... Perhaps the comments to the story (also linked to there) will be useful to you.
Anyhow, what I recall from reading it was that the guy had spent lots of time with both Swing and SWT, and he found that he was unhappy with SWT for a number of reasons. One of which was that SWT primarily gets bug-fixes for stuff related to Eclipse and not much else.
Are you kidding? I loved using the Swing API! I found it both intuitive and enjoyable, much more so than QT at the time (this was about 18 months ago). I made all kinds of cool Swing demo apps for my classes, like a simple paint program, a "duck hunt" game where each bird flew in it's own thread, a slide show viewer that would continuously apply random image distortion algorithms over and over (it made an awesome picture look even more awesome than before, which was awesome believe me). Too bad I don't have any old source code with me at the moment, otherwise I would share. I picked up the basics of Swing very quickly from the book Programming with Objects (http://www.programmingwithobjects.com/).
If I had spare time, I wouldn't mind cooking up some more simple GUI programs with AWT/Swing.
I dunno. I had a heck of a time trying to get my GUI apps sized and layed (?) out correctly with Swing. Between GridBag, Flow, Border I've had it up to here with layouts.
I've installed Eclipse on both my WinXP box at work and my system at home. I then installed the Windowbuilder Pro plugin for Eclipse GUI development, and I'm already happy. I've only done about three little demos, but the layout and ability to control properties, not to mention the intellisence (I'm a reformed VB Coder.) in the code, is awesome.
Hmm, that's a big problem? I don't actually see it that way. As it is, I have an application in mind (a binary Usenet download app improving on Newsbin / KLibidio / KNZB) which I have been designing and hope to have full cross-platform support right out of the gate. My first attempts at the view portion was to use Swing, but even there I would have different libraries loading depending on whether I want Motif or Metal or something else.
In this case I see myself setting up the view portion to simply determine what OS is being run, then instantiate the appropriate class libraries for the display - either on Darwin, GTK, or Win32. Once that's done all the background work will be handled the same. Hopefully this will match the MVC standard I read so much about.
So far, I've been writing everything to the CLI, since I want my program logic down before I even get to the GUI. This is forcing me to ensure my controller logic is going to be seperate from my view logic. At the same time, I want to make sure that my GUI looks good and is easy to implement/maintain when I get done.
Looking at apps like Azureus, which i use often both on Win2K and my SuSE box, I can see the benefits. Azureus just looks good and feels natural regardless of which platform I'm on. OTOH, I use Limewire on both platforms and I cringe every time - it feels and responds like a Java GUI. I know I can change the look/feel but it just doesn't feel as snappy as Azureus. (This is no slam on the ability of LW to work as intended. I grab "test" items all the time using LW.)
Or, maybe I should just write everything in VB6, right?
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789
Rep:
Quote:
My first attempts at the view portion was to use Swing, but even there I would have different libraries loading depending on whether I want Motif or Metal or something else.
Of course the JVM eventually need to load a library to access the physical hardware but this library is already there with SWING, the issue with SWT is that the needed library it is not bundled with the JVM, so code using SWT is not portable to any JVM supporting SWING, you have to install SWT too, and possibly install it from the source if no binary exists for your platform.
Also SWING need not a high level underlying library while SWT does.
Hmm, valid point. Let me try this out on a few simple apps and see what I can do. My expectation is that I'll make an installer that puts everything in the app directory (I despise the idea of this.sub.directory.of.another.something.that.is.twenty.levels.deep) and references that.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.