A
Andrew Thompson
I was just writing a multi-line comment for some code for
appleteer, about a little hack that is intended to overcome
a problem with the current version.
/* This little hack allows us to overcome the 'applet overwrites
everything' (e.g. scroll bars, menus) problem seen in early
versions of the program, but only for Swing applets that 'do
not override paint'. That latter part is hard to detect, but we
take the simple approach of counting the numbers of
components in the root and content panes. If these are
more than for a blank applet (i.e. 'components have been
added'), it is presumed the applet does not override paint. */
The hack then (presuming no override of paint()) adds the
JApplet's rootpane to the AppletLoaderContainer, instead of
the applet itself.
Are there better ways to detect if an arbitrary Swing applet
overrides paint(Graphics)?
(Or any method, of any class, for that matter.)
appleteer, about a little hack that is intended to overcome
a problem with the current version.
/* This little hack allows us to overcome the 'applet overwrites
everything' (e.g. scroll bars, menus) problem seen in early
versions of the program, but only for Swing applets that 'do
not override paint'. That latter part is hard to detect, but we
take the simple approach of counting the numbers of
components in the root and content panes. If these are
more than for a blank applet (i.e. 'components have been
added'), it is presumed the applet does not override paint. */
The hack then (presuming no override of paint()) adds the
JApplet's rootpane to the AppletLoaderContainer, instead of
the applet itself.
Are there better ways to detect if an arbitrary Swing applet
overrides paint(Graphics)?
(Or any method, of any class, for that matter.)