文本编辑器源文件(java语言)(26) if(sel.index!= cus.index) { select= true; selold= true; repaint(); } } private void drawselect(Graphics g) { int ji= 0; paint_x= 3-(int)(sc.offsetx*cus.w); paint_y= fh-(int)(sc.offsety*fh); for(int i=0;i< totle;i++) { if(text[i]=='\n') { paint_x = 3-(int)(sc.offsetx*cus.w); paint_y+=cus.h; i++; } fw= fm.charWidth(text[i]); if(sel.index>cus.index) { if((i< totle)&&(i<=sel.index)&&(i>=cus.index)) { sel.sels[ji]= text[i];