Hallo,
wie kann ich bei meinem Sourcecode noch die Ausgabefenstergröße festlegen
hier mal mein Code
[Java]
import java.applet.Applet;
import java.awt.Graphics;
public class HausZaun1 extends Applet
{
public static void main(String[] args)
{
}
public void paint (Graphics stift)
{
//Haus
stift.drawRect(100, 100, 200, 200);
stift.drawLine(100, 100, 200, 50);
stift.drawLine(300, 100, 200, 50);
//Fenster
stift.drawRect(140, 140, 40, 40);
stift.drawRect(230, 140, 40, 40);
//Türe
stift.drawRect(185, 250, 40, 50);
//Zaun links
stift.drawLine(10, 300, 10, 250);
stift.drawLine(20, 300, 20, 250);
stift.drawLine(10, 250, 15, 240);
stift.drawLine(15, 240, 20, 250);
stift.drawLine(40, 300, 40, 250);
stift.drawLine(50, 300, 50, 250);
stift.drawLine(40, 250, 45, 240);
stift.drawLine(45, 240, 50, 250);
stift.drawLine(70, 300, 70, 250);
stift.drawLine(80, 300, 80, 250);
stift.drawLine(70, 250, 75, 240);
stift.drawLine(75, 240, 80, 250);
stift.drawRect(10, 266, 70, 3);
stift.drawRect(10, 280, 70, 3);
//Zaun rechts
stift.drawLine(320, 300, 320, 250);
stift.drawLine(330, 300, 330, 250);
stift.drawLine(320, 250, 325, 240);
stift.drawLine(325, 240, 330, 250);
stift.drawLine(350, 300, 350, 250);
stift.drawLine(360, 300, 360, 250);
stift.drawLine(350, 250, 355, 240);
stift.drawLine(355, 240, 360, 250);
stift.drawLine(380, 300, 380, 250);
stift.drawLine(390, 300, 390, 250);
stift.drawLine(380, 250, 385, 240);
stift.drawLine(385, 240, 390, 250);
stift.drawRect(320, 266, 70, 3);
stift.drawRect(320, 280, 70, 3);
}
}
[/Java]
Danke
Holger
wie kann ich bei meinem Sourcecode noch die Ausgabefenstergröße festlegen
hier mal mein Code
[Java]
import java.applet.Applet;
import java.awt.Graphics;
public class HausZaun1 extends Applet
{
public static void main(String[] args)
{
}
public void paint (Graphics stift)
{
//Haus
stift.drawRect(100, 100, 200, 200);
stift.drawLine(100, 100, 200, 50);
stift.drawLine(300, 100, 200, 50);
//Fenster
stift.drawRect(140, 140, 40, 40);
stift.drawRect(230, 140, 40, 40);
//Türe
stift.drawRect(185, 250, 40, 50);
//Zaun links
stift.drawLine(10, 300, 10, 250);
stift.drawLine(20, 300, 20, 250);
stift.drawLine(10, 250, 15, 240);
stift.drawLine(15, 240, 20, 250);
stift.drawLine(40, 300, 40, 250);
stift.drawLine(50, 300, 50, 250);
stift.drawLine(40, 250, 45, 240);
stift.drawLine(45, 240, 50, 250);
stift.drawLine(70, 300, 70, 250);
stift.drawLine(80, 300, 80, 250);
stift.drawLine(70, 250, 75, 240);
stift.drawLine(75, 240, 80, 250);
stift.drawRect(10, 266, 70, 3);
stift.drawRect(10, 280, 70, 3);
//Zaun rechts
stift.drawLine(320, 300, 320, 250);
stift.drawLine(330, 300, 330, 250);
stift.drawLine(320, 250, 325, 240);
stift.drawLine(325, 240, 330, 250);
stift.drawLine(350, 300, 350, 250);
stift.drawLine(360, 300, 360, 250);
stift.drawLine(350, 250, 355, 240);
stift.drawLine(355, 240, 360, 250);
stift.drawLine(380, 300, 380, 250);
stift.drawLine(390, 300, 390, 250);
stift.drawLine(380, 250, 385, 240);
stift.drawLine(385, 240, 390, 250);
stift.drawRect(320, 266, 70, 3);
stift.drawRect(320, 280, 70, 3);
}
}
[/Java]
Danke
Holger