Java Applet Windows size in Eclipse

后端 未结 3 626
遇见更好的自我
遇见更好的自我 2021-01-14 15:20

I am trying to set the size of an Applet Window to 500 by 500, but I couldn\'t be able to achieve that. Here is my code,

  public void init() { 
    // Start         


        
相关标签:
3条回答
  • 2021-01-14 15:29

    To change the size of the Applet Window, without looking for the eclipse .html is to choose "Run Configurations" in the "Run, '>' icon options " in the eclipse panel. In the configurations choose "Parameters" and set the size of the applet in the two boxes available for 'height' and 'length.' You may leave the box 'name' unfilled.

    0 讨论(0)
  • 2021-01-14 15:42

    If you use eclipse, you can change applet size from the "run configuration" Java Applet->Parameters". I think that's the problem, because the default value of java applet size in eclipse is 200*200.

    Hope it will helpful: a similar issue

    0 讨论(0)
  • 2021-01-14 15:45

    try this inside the paint method for example

    this.setSize(300, 300);
    
    0 讨论(0)
提交回复
热议问题