アットウィキロゴ

1019

import javax.swing.*;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.geom.*;

public class game1018 extends JPanel{

 public static void main(String[] args){
   JFrame frame = [[new]] JFrame();
   game1018 app = new game1018();
   frame.getContentPane().add(app);
   frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
   frame.setBounds(0, 0, 500, 500);
   frame.setTitle("[[タイトル]]");
   frame.setVisible(true);
 }

 public void paintComponent(Graphics g){
   Graphics2D g2 = (Graphics2D)g;
   g2.draw(new Line2D.Double(20, 20, 160, 140));
 }
}
最終更新:2011年03月07日 00:20