Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

This week's book giveaway - "Swing"

 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This week we are giving away Swing (2nd edition). Plus the authors, Matthew Robinson and Pavel Vorobiev, are going to be here in the "Swing / JFC / AWT" forum here on JavaRanch!

Be sure to give them a big JavaRanch "Howdy!" (and try to give them your <i>really</i> hard Swing questions!)

Make sure that you are registered and that your posts are on topic so you will be in the running for the free books! (For details check out JavaRanch Book Promo)

A big thanks to Manning for the books!
 
M.K.A. Monster
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Howdy howdy howdy.
Let's Swing this Javaworld.
Regards,
Mark Monster
 
Paul Stevens
Ranch Hand
Posts: 2823
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome.
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does the book cover design patterns in GUI development? I don't mean just MVC but patterns like mediator, command, etc..
I checked the book description at Amazon but it only mentioned MVC.
 
Gregg Bolinger
GenRocket Founder
Ranch Hand
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am also wondering what kind of patterns you cover, but I am looking for Action and Command patterns. I have yet to find a book that covers these patterns AND gives good examples of them used in a SWING App. It is discouraging because I am trying to learn these patterns. How much does your book go into that? And what kind of examples?
 
Cindy Glass
"The Hood"
Sheriff
Posts: 8521
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is an April Fools Joke - isn't it?
These guys are not REALLY going to show up are they?
 
Matthew Vorobiev and Pavel Robinson
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ummmm... of course we are! Aaaaaa... Swing is really cool and everyone should use it. Oops, gotta go!
 
Matt Robinson
author
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For better or for worse at least one of us is here
To answer your question on patterns, we don't cover ANY of them - sorry. For the same reason we dropped several other topics -- the book was getting too fat. This wasn't entirely our decision, the publisher asked us to select 4 chapters to drop from the first edition so we really had to stick to the core library this time around.
Sounds like a good idea for a separate book or at least a few articles..
Regards,
-Matt
 
Younes Essouabni
Ranch Hand
Posts: 479
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thx for your answer Matt, could you take a look at this thread plz.
Sorry to hijack this thread.
Thx in advance
 
sing
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Matt,
Do you means it's not cover Timer as well? I have study from "The JFC Swing Tutorial" but i still have no idea to use Timer.
Can you give me some idea if i want to control a Swing class loop itself in main method?
public static void main(String[] args) {
JFrame frame = new TestLoopFrame();
}
Thank You.
steffy
 
Gregg Bolinger
GenRocket Founder
Ranch Hand
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Matt Robinson:
For better or for worse at least one of us is here
To answer your question on patterns, we don't cover ANY of them - sorry. For the same reason we dropped several other topics -- the book was getting too fat. This wasn't entirely our decision, the publisher asked us to select 4 chapters to drop from the first edition so we really had to stick to the core library this time around.
Sounds like a good idea for a separate book or at least a few articles..
Regards,
-Matt

So any information on some good links or books where we can find some good examples/tutorials on using command and action patterns with SWING?
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Matt Robinson:
Sounds like a good idea for a separate book or at least a few articles.

Yes, please! I have yet to find a pattern book for Java GUIs. I've always managed to hack the functionality but the code has been somewhat ugly...
Could you write such a book for, say, next week?
 
sing
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Matt,
I've always managed to hack the functionality but the code has been somewhat ugly...

I have same problem as Lasse. Sometimes, i really hate to look to my ugly Swing program.....
Although I always keep away myself to Swing but I still hope I can code it nicely...Can you give some guideline or pattern to code Swing nicely?
steffy
 
sing
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Gregg Bolinger:

So any information on some good links or books where we can find some good examples/tutorials on using command and action patterns with SWING?

I have brought "The JFC Swing Tutorial" by Kathy Walrath & Mary Campione but you can also read the
Tutorial on Java Sun Website
steffy
 
Jonathan Gerrish
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hiya, does it cover any of the HCI/cognative issues involved in GUI design? I'm particually interested this. For example how to lay out components etc to make the GUI intuative + promote a good user experience.
Otherwise anyone have any good links on the topic?
All the best, Jon
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Steffy Sing:
..."The JFC Swing Tutorial" by Kathy Walrath & Mary Campione...

I've browsed through the Swing Tutorial at java.sun.com some time ago but as far as I can remember, it didn't say a word about patterns or best practices. Has this changed? Then the whole tutorial was about "how to use the API" kind of information.
 
Matt Robinson
author
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Gregg Bolinger:

So any information on some good links or books where we can find some good examples/tutorials on using command and action patterns with SWING?

The Action architecture seems to be by far the most written about example of this:
http://java.sun.com/products/jfc/tsc/articles/actions/
http://www.javaworld.com/javaworld/jw-06-2002/jw-0628-designpatterns.html
Do a Google search for "command pattern swing"
[ April 02, 2003: Message edited by: Matt Robinson ]
 
Matt Robinson
author
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Steffy Sing:
Hi Matt,
Do you means it's not cover Timer as well? I have study from "The JFC Swing Tutorial" but i still have no idea to use Timer.


Timers are covered and an example in chapter 2 at http://www.manning.com/sbe should answer your question
 
Matt Robinson
author
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Jonathan Gerrish:
Hiya, does it cover any of the HCI/cognative issues involved in GUI design? I'm particually interested this. For example how to lay out components etc to make the GUI intuative + promote a good user experience.

This is briefly touched upon in our "UI Guidelines" in each chapter (written by a User Interface design expert, David Anderson). However, it by no means covers good user interface design beyond basic recommendations. The only book I could personally recommend in this area is Designing Visual Interfaces - communication oriented techniques, Kevin Mullet and Darrell Sano, Sunsoft, Prentice Hall, 1995. But this is probably higher level than what you are looking for.
 
Younes Essouabni
Ranch Hand
Posts: 479
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could you give us an advice about best practice to handle events. Is it better to handle all events in one separate class (that's what I'm doing, it's allowing me to share behaviours but the class becomes quickly heavy), or is it better to have a handler per class?
Thanks in advance, we won't let you sleep
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Younes Essouabni:
Could you give us an advice about best practice to handle events.

...and how to design access to different parts of the GUI -- accessor methods versus protected members, etc.
 
Gregg Bolinger
GenRocket Founder
Ranch Hand
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Matt Robinson:

The Action architecture seems to be by far the most written about example of this:
http://java.sun.com/products/jfc/tsc/articles/actions/

Ah, a typical Sun article. A lot of background information and links but hardly any explination of the given code.

http://www.javaworld.com/javaworld/jw-06-2002/jw-0628-designpatterns.html

Ok, in regards to this example:
How is doing that any better design wise than just saying:

The code in the example from the Javaworld Article acheives the exact same result just a bit differently. I don't see any advantage of one over the other and isn't that the point in design patterns? That they are supposed to give better advantages?
 
Greg Ostravich
Ranch Hand
Posts: 112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What about Layout Managers?
I know they are more AWT specific but if you have anything on GridBag that would be great.
I never really got the hang of it.
I haven't done a lot with Swing lately - are there new Layout Managers?
Are there new Swing features in 1.4?
 
Shane Roylance
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Matt,
I was wondering if the book covered the new printing API at all. It's a subject that I am having a hard time finding anything about. (Is that considered part of swing?)
Thanks
Shane
[ April 02, 2003: Message edited by: Shane Roylance ]
 
Pam Ginther
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Good Morning,
I am working on my first swing application and I am creating a table that will hold detail items from an order. I want to be able to do the methods in the AbstractTableModel but I also need to be able to add a blank row like in DefaultTableModel. The sun javadoc's do not recommend the use of DefaultTableModel. Question: What table model should I use that will allow me all of the capabilities that I need?
Thank you in advance for your time!
Pam Ginther
 
jam bingo
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i, for one, would really like to see Swing as it relates to JApplets discussed... i recently wrote a java chat server and client, with the client utilizing Swing components via the JApplet extension of the standard awt Applet class...
sure would like to get a reference for JApplet/Swing questions...
anyone else using JApplet for anything?
 
Younes Essouabni
Ranch Hand
Posts: 479
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Shane Roylance:
Hi Matt,
I was wondering if the book covered the new printing API at all. It's a subject that I am having a hard time finding anything about. (Is that considered part of swing?)
Thanks
Shane
[ April 02, 2003: Message edited by: Shane Roylance ]

Hi Shane, from this URL we may see that it cover the Printing.
Happilly, the printing is one of the free chapters that you may consult from the website

[ April 02, 2003: Message edited by: Younes Essouabni ]
 
Shane Roylance
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JAVA 1.4As of Java 1.4 there is a new javax.print package allowing more detailed control of print jobs and communication with printers. Coverage of this new package is beyond the scope of this book, as it is deserving of a much more extensive treatment than we can provide here. This chapter should be considered a primer on printing with Swing, and for those issues that cannot be solved using the material here we would suggest digging into the new javax.print package.

That's a quote from this book. Does anyone know of any kind of documentation on the javax.print package???
Thanks
Shane
 
Rob Hunter
Ranch Hand
Posts: 832
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey and Howdy,
Never had time to read through all the postings here but does your book cover anything in relation to printing to a printer? Interaction between java and other languages? Also I was curious to see which aspects of using Swing components and java's AWT you found to be most interesting and which you found to be most "useful" in real-world applications? Sorry I don't have any real challenging questions, just questions more of interest. Thanks.
Rob
 
Vedhas Pitkar
Ranch Hand
Posts: 445
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!Looking forward to winning your Book!
 
Thomas Paul
mister krabs
Ranch Hand
Posts: 13974
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey guys, don't put all your questions in here! Open up new threads for your questions... the rules are that no posts in this thread count towards the contest!
 
Barry Gaunt
Ranch Hand
Posts: 7729
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Don't going listening to Thomas now, just stay in there, all nice and cozy like.
 
Francis Siu
Ranch Hand
Posts: 867
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hihi
Thomas VS Barry
Who will win?
Just for fun,do not angry
 
Michael Roach
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Matt Robinson:
[QB] To answer your question on patterns, we don't cover ANY of them - sorry. For the same reason we dropped several other topics -- the book was getting too fat. This wasn't entirely our decision, the publisher asked us to select 4 chapters to drop from the first edition so we really had to stick to the core library this time around.

What were the topics of the other three chapters that were eliminated?
[ April 03, 2003: Message edited by: Michael Roach ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic