|
文本编辑器源文件(java语言)(4) //oldx= x-3; //oldy= y-3; return true; } return false; }
public boolean mouseDown(Event evt,int x,int y) { if((x>=0)&&(x<=100)) { current= colors[y]; System.out.println(y); getGraphics().setColor(current); getGraphics().fillRect(330,30,60,60); return true; } if((x>100)&&(x<=200)) { current= colors1[y]; getGraphics().setColor(current); getGraphics().fillRect(330,30,60,60); return true; } if((x>200)&&(x<=300)) { current= colors2[y]; getGraphics().setColor(current); getGraphics().fillRect(330,30,60,60);
|