Re: Invisible applet
On Apr 22, 10:26 am, Dirk Bruere at NeoPax <dirk.bru...@gmail.com>
wrote:
Andrew Thompson wrote:
On Apr 22, 9:55 am, Dirk Bruere at NeoPax <dirk.bru...@gmail.com>
wrote:
Using netbeans designer to put together a JApplet - Form holding a
Jpanel with stuff on it. Sometimes it compiles OK ..
So other times it does not compile OK?
Usually after I resize the JPanel on the form
(polite cough)
1) That sound more like a run-time fix.
2) Don't even start to think about 'resizing'
anything embedded within an applet. That is
a 'recipe for disaster'.
..and the applet looks
fine in an HTML page. Other times I just end up with a blank applet (n=
o
error messages).
Dose the code at any stage call setLayout(null)?
It did at one time.
Are you saying that it no longer calls it, or
only calls it once in the code?
Does the code call validate() after all components
are added?
Am expecting an answer to this question. That is
why I asked it.
Always runs OK in the applet viewer in Netbeans.
What am I doing wrong?
1) Relying on anything Netbeans does during development,
as being an accurate reflection of the 'real world'.
2) Relying on the applet viewer (which I suspect, NB invokes
to display applets) as being realistic of behavior in a JRE
in a web page.
(please trim sigs)
Shit - now the design view won't close.
Are you going to tell me Netbeans is a heap of crap?
No. Netbeans is a fine IDE. It is just that you
should not come to rely too heavily on the way
Netbeans does things, since you need to deploy the
project in the real world, or perhaps even over the
world 'wild' web (an even tougher deployment environment
than many others).
The major problem in this case, is probably the
Applet Viewer, which although it tries hard, does
not accurately reflect the browser environment.
As a result of its deficiencies I wrote and offer
Appleteer*, which goes a little further in representing
an actual applet deployment (e.g. allows multiple
applets in same page, stream sharing, showDocument() ..),
though still falls far short in many significant areas
(security, JS support, ..applet resizing).
* <http://pscode.org/appleteer/>
--
Andrew T.
pscode.org