The Source for Java Technology Collaboration

Home » java.net Forums » JDK » Java SE

Thread: Better examples

Welcome, Guest Help
Login Login
Guest Settings Guest Settings
Reply to this Thread Reply to this Thread Search Forum Search Forum Back to Thread List Back to Thread List

Permlink Replies: 3 - Last Post: Mar 11, 2005 2:31 AM by: bloid
tackline

Posts: 238
Better examples
Posted: Mar 8, 2005 3:42 PM
  Click to reply to this thread Reply

The "Totally GridBag" Flash has been widely linked (http://madbean.com/blog/2004/17/). The grid bag code does indeed look bad. Where would some get the strange ideas about coding like that? The JavaDoc is the most obvious place to look.

And there it is. The example in GridBagLayout is only appropriate for JDK 1.0.2 and earlier. Remember back that far? Hasn't there been enough time to update the docs since 1.1 was released in the mid 90's?

More generally, the JDK demos and samples are in need of significant work and there aren't many examples of good usage throughout the JavaDocs.

zixle

Posts: 35
Re: Better examples
Posted: Mar 9, 2005 2:25 PM   in response to: tackline
  Click to reply to this thread Reply

Thanfully GridBagLayout has recently been optimized! It's in the 1.6 builds now.

As to examples, yes, we need to ship better examples that more closely match that of how we want people to use our apis. It's something we see as very important and hope to do it in 1.6.

-Scott

netsql

Posts: 190
like EJB
Posted: Mar 10, 2005 8:33 AM   in response to: zixle
  Click to reply to this thread Reply

Think of GridBag as EJB... you can do Java and not use it.
Most projects just use the jGoodies Layout. It's built to be human readable.
Just use that instead, and one day.... hopefully... gridbag will be deprecated.
.V

bloid

Posts: 2
Re: like EJB
Posted: Mar 11, 2005 2:30 AM   in response to: netsql
  Click to reply to this thread Reply

>> Think of GridBag as EJB... you can do Java and not use it.

Yes, and it does have its place and uses. Like EJB, it's a case of knowing when to use it...

>> Most projects just use the jGoodies Layout.

?!?

Do you have proof of this seemingly flamboyant claim?




 XML java.net RSS