|
|
Any good books for learning Swing or AWT?
|
|
|
|
Mac Elite
Join Date: May 2001
Location: Up north
Status:
Offline
|
|
So ya.. I really, really like Java. It's totally awesome.. it's a breath of fresh air. So, now I would like to do more with it than making cli tools.
Any suggestions on books for learning Swing or AWT? (that is not an xor, so one that covers both is also good)
|
|
|
|
|
|
|
|
|
Senior User
Join Date: Oct 2000
Location: Lawrence, KS
Status:
Offline
|
|
I wasted a good amount of money on this subject a couple of years ago. The only worthwhile reading was:
"The JFC Swing Tutorial: A Guide to Constructing GUIs"
Which I believe is also distributed freely by Sun Micro.
Java is great for command line tools and overall server side programming. But Swing SUCKS
There's no better way of putting it... especially when compared to something as neat as Cocoa.
Be as it may, if you want to learn Swing then the above book should do the trick.
|
|
|
|
|
|
|
|
|
Registered User
Join Date: Feb 2003
Status:
Offline
|
|
Swing has traditionally been a major draw back in Java. Prior to 1.4.1 the internals of Swing was broken according to SUN. Now with 1.4.1 SUN redid all the internals of Swing and 1.4.1 Swing applications are much nicer, and zippier. Still not Cocoa speed but respectable. But the applications must be using 1.4.1 not 1.3.1 as many Java apps on the Mac still do. Also since Java 1.4.1 on Mac OSX calls Cocoa GUI elements Java looks the best on Mac OSX.
Swing is rather more complex and labour intensive then using Interface Builder and Cocoa. But it is not impossible to build nice interfaces with Swing. a good point is ThinkFree Office v2.2 which under 1.4.1 looks just smick, and with very little applications hangs. ThinkFree Office v2.2 flickers now and then when it has to refresh the whole page, but still good.
And I have one of the slowest G4 on the market the old 350 Sawtooth.
Best of Luck in your adventure. I would be learning GridBagLayout not as complex as people make out its just like HTML Tables but with a more CSS style logic. Also avoid absolute positioning its tempting but makes your apps ugly across platforms.
As for a good book, the SUN Swing tutorial is really good. But I would also look toward the O'Reily Swing book in 3rd edition or something.
|
|
|
|
|
|
|
|
|
Professional Poster
Join Date: Apr 2001
Location: Seattle, WA
Status:
Offline
|
|
hit up sun.java.com keep the api's open, and find some tutorials from them. but be prepared, it's retarded in the extreme. if you want, pm me, I'll hook you up w/ some sample code I've been doing for class. e-mail's in the profile, too.
|
The short shall inherit the earth. Just you wait. You won't see us coming. We'll pop out from under tables, beds, and closets in hordes. So you're tall, huh? You won't be so tall when I chew off your ankles. Mofo
|
|
|
|
|
|
|
|
Registered User
Join Date: Sep 2002
Location: New York City
Status:
Offline
|
|
If you are new to Java interfaces programming, then a book or online tutorial would be a great place to start. I would recommend a book, but I don't really remember where I got started with learning AWT. Actually, while studying for the Sun Programmer Cert. exam I learned about the various concepts.
If you already know some of the concepts of the Java interface (Containers, Layout Managers, Events, Listeners)...
What you may want to do is download and install Sun ONE ( mac: http://forte.sun.com/ffj/articles/macOSX.html, and they have it for Windows too). The Community Edition is free. It's a nice IDE for building Java programs. You can construct a simple interface using AWT components and Swing components, then look at the code and see what it's doing. I'd suggest keeping a browser open on Sun's classes page so you could quickly look up the methods and ideas of a class. Notice that Sun ONE will only let you edit non-blue-highlighted code while in the ONE editor. You can modify the code in another program (SimpleText, vi, emacs, etc.), but then the ONE editor may not like it anymore. Overall, Sun ONE is a great way to create a practice interface and then view the source code for it.
hope this helps.
-Ben
|
|
|
|
|
|
|
|
|
Forum Regular
Join Date: May 2001
Location: Oviedo, Floriduh USA
Status:
Offline
|
|
Besides the Sun tutorial, I use Core Java Foundation Classes (ISBN 0-13-080301-4) as a guide.
There are actually very few books that are more than minimal showcases for a single GUI widget in each subsection.
Find real source code to learn how to do it. It's too labour-intensive otherwise.
I'm still working on my folding@home progress app, which is done with Swing, and it's quite a lot of prodding and poking to get exactly what I want.
|
folding@home is good for you.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Forum Rules
|
|
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
|
|
|
|
|
|