Applet Question

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Kid Programmer
    New Member
    • Mar 2008
    • 176

    Applet Question

    Why is it whenever you scroll up and down on a web page an Applet flashes.
  • BigDaddyLH
    Recognized Expert Top Contributor
    • Dec 2007
    • 1216

    #2
    This applet does flash for me:

    Comment

    • sukatoa
      Contributor
      • Nov 2007
      • 539

      #3
      May i know what's the content of your paint( Graphics graphics ) method?

      Comment

      • Kid Programmer
        New Member
        • Mar 2008
        • 176

        #4
        Originally posted by sukatoa
        May i know what's the content of your paint( Graphics graphics ) method?
        Usually just things like g.drawString("a sdfsdg", 123, 123); and things like that.

        Comment

        • BigDaddyLH
          Recognized Expert Top Contributor
          • Dec 2007
          • 1216

          #5
          A properly written JApplet shouldn't flash. Post a SSCCE: http://mindprod.com/jgloss/sscce.html

          By the way, unless you have a specific requirement for sticking it on a web page, I suggest writing a stand-alone app with a JFrame instead. It's easier to debug and test (no browser getting in the way) and you can always turn it into a JApplet later.

          Comment

          • JosAH
            Recognized Expert MVP
            • Mar 2007
            • 11453

            #6
            Originally posted by BigDaddyLH
            A properly written JApplet shouldn't flash.
            The OP was talking about Applets, not JApplets; he probably should use the
            latter; if at all.

            kind regards,

            Jos

            Comment

            • BigDaddyLH
              Recognized Expert Top Contributor
              • Dec 2007
              • 1216

              #7
              Originally posted by JosAH
              The OP was talking about Applets, not JApplets; he probably should use the
              latter; if at all.

              kind regards,

              Jos
              Oh, that's true. I didn't assume "applet" meant "class Applet, not JApplet". They should hide the old AWT tutorial better ;-)

              Comment

              Working...