File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
sources/net.sf.j2s.java.core/src/java/awt Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -242,7 +242,15 @@ public Graphics getGraphics() {
242242 if (width == 0 || height == 0 || !isVisible ())
243243 return null ;
244244 Graphics g ;
245- if (秘frameViewer != null ) {
245+ // this was 秘frameViewer != null, but that
246+ // fails for paintImmediately, because all components
247+ // have a reference to FrameViewer now, and so the
248+ // offset was not being applied. The special case for
249+ // ContentPane adds its insets. parent == null is a
250+ // proxy for Applet or Window since only they can be
251+ // here and not have a parent.
252+ if (parent == null || 秘isContentPane ) {
253+ // this next call adds the necessary transform.
246254 g = 秘frameViewer .getGraphics ().create ();
247255 if (秘isContentPane ) {
248256 if (秘tempInsets == null )
You can’t perform that action at this time.
0 commit comments