アットウィキロゴ

おおお7

package p4;


public class pro {



   public static void main(String[] args) {
       pro t=new pro();
   }
   pro(){

graph sub4=new graph(); 
sub4.w=500;
sub4.h=750;
sub4.makedata("den.jpg");


   }
   }



package p4;

import java.awt.*;
import java.awt.Color;
import java.awt.image.*;
import java.awt.image.BufferedImage;
import java.io.*;
import javax.imageio.ImageIO;
import java.awt.Polygon;

class graph{

   int h;
   int w;




void makedata(String file){

   int w1,h1,mx,nx;

w1=w;
h1=h;
BufferedImage off = new BufferedImage(w1, h1, BufferedImage.TYPE_INT_BGR);
Graphics offsc = off.getGraphics();

int z;
offsc.setColor(Color.white);
offsc.fillRect(0,0,w,h);
offsc.setColor(Color.black);
Font font = new Font("SansSerif", Font.BOLD, 20);
offsc.setFont(font);

int s;
String str="";
[[for]](s=1;s<21;s++){
str=str+"猫";    
}

for(s=1;s<26;s++){
offsc.drawString(str,50,25+25*s);
}


offsc.dispose();

try {
ImageIO.write(off, "jpeg", new File(file));
} catch (IOException exception) { exception.printStackTrace(); }
}
}
最終更新:2017年12月08日 22:37