Index: graph/lib/src/org/netbeans/api/visual/widget/Widget.java =================================================================== RCS file: /cvs/graph/lib/src/org/netbeans/api/visual/widget/Widget.java,v retrieving revision 1.53 diff -u -r1.53 Widget.java --- graph/lib/src/org/netbeans/api/visual/widget/Widget.java 21 Feb 2007 19:17:14 -0000 1.53 +++ graph/lib/src/org/netbeans/api/visual/widget/Widget.java 20 Mar 2007 10:44:16 -0000 @@ -1080,7 +1080,7 @@ if (opaque) paintBackground (); - border.paint (gr, new Rectangle (bounds)); + paintBorder (); if (checkClipping) { Insets insets = border.getInsets (); @@ -1109,6 +1109,13 @@ gr.fillRect (bounds.x, bounds.y, bounds.width, bounds.height); else gr.fillRect (bounds.x + insets.left, bounds.y + insets.top, bounds.width - insets.left - insets.right, bounds.height - insets.top - insets.bottom); + } + + /** + * Called to paint the widget border itself only using the Graphics2D instance acquired from Scene.getGraphics method. + */ + protected void paintBorder () { + border.paint (getGraphics (), new Rectangle (bounds)); } /** Index: graph/lib/src/org/netbeans/api/visual/widget/doc-files/documentation.html =================================================================== RCS file: /cvs/graph/lib/src/org/netbeans/api/visual/widget/doc-files/documentation.html,v retrieving revision 1.3 diff -u -r1.3 documentation.html --- graph/lib/src/org/netbeans/api/visual/widget/doc-files/documentation.html 15 Mar 2007 11:17:48 -0000 1.3 +++ graph/lib/src/org/netbeans/api/visual/widget/doc-files/documentation.html 20 Mar 2007 10:44:16 -0000 @@ -387,6 +387,9 @@ protected paintBackground Paints the widget background only. Do not invoke painting of children in this method. See Custom Widget section. +protected paintBorder +Paints the widget border only. Do not invoke painting of children in this method. See Custom Widget section. + protected paintWidget Paints the widget only. Do not invoke painting of children in this method. See Custom Widget section.