Java applet setSize not accurate, window too large

后端 未结 1 723
野性不改
野性不改 2021-01-16 12:07

I have a Java applet that J am trying to to set to 480, 800 using setSize but the window comes up 487,850 for some reason. here is the code where it is set.

         


        
相关标签:
1条回答
  • 2021-01-16 12:42

    You don't set the size of the applet in the applet itself, and trying to do this will have no effect, as you're finding out. If you want to specify the size of the applet, you do this in the HTML code that calls the applet.

    As an aside, your //TODO: handle exception is telling you something important, that you shouldn't leave the catch block empty.

    0 讨论(0)
提交回复
热议问题