【初心者】Java質問・相談スレ46【大歓迎】
■ このスレッドは過去ログ倉庫に格納されています
0264デフォルトの名無しさん
NGNGマウスを放した時に最終的に終点を決定して楕円を描くようにするプログラム中の空欄を埋めながら完成させなさい。
import java.applet.*;
import java.awt.*;
import java.awt.event.*;
public class Kadai extends [ 1 ]{
int x1,y1;
public void init(){
[ 2 ]
[ 3 ]
}
public void mouseDragged(MouseEvent me){
int x0,y0,x2,y2;
Graphics g=this.getGraphics();
g.clearRect(0,0,300,300);
x2=[ 4 ];
y2=[ 5 ];
if(x1>=x2)[ 6 ]else[ 7 ]
if(y1>=y2)[ 8 ]else[ 9 ]
g.drawOval([ 10 ],[ 11 ],[ 12 ],[ 13 ]);
}
■ このスレッドは過去ログ倉庫に格納されています