Other Swing Changes

New JComponent methods: printBorder, printComponent, printChildren

JComponent previously did not override print. This meant that printing was no different than painting, resulting in the double buffer being used. This is not the desired behavior. It also makes it harder for developers to add customized printing logic. In most cases the developer would resort to completely replacing print, rewriting all the code to notify the children. This is not desirable. To be consistant with the painting methods, methods printBorder, printChildren and printComponent have been added, all of which are protected.


Copyright © 1999 Sun Microsystems, Inc. All Rights Reserved.

Please send comments to: This is not a subscription list.
Java Software