±Û¾´ÀÌ :tony 2000³â 7¿ù 18ÀÏ 16:34:35
´ë´äÀÌ ¾È¿Ã¶ó¿Í¼ È¥ÀÚ¼ ÇØ°áÇغ¼¶óÇߴ¤§..
µµÀúÈ÷ ¸ð¸£°Ú³×¿ä..
ÈùÆ®Á» ÁÖ¼¼¿ä..
¿ì¼± ½ºÅ©·Ñ Ædzڿ¡ ĵ¹ö½º¸¦ ¿Ã¸®°í ±×¸²À» ±×·È½À´Ï´Ù.
½ºÅ©·ÑÀÇ Å©±â¿Í À§Ä¡´Â reshape·Î Àâ¾Ò±¸¿©..
½ºÅ©·Ñ¹Ùµµ always·Î Çصξú½À´Ï´Ù.
´ç¿¬È÷ º¸ÀÌÁÒ..??
±Ùµ¥...
Ædzڿ¡ ¾Æ¹«¸® ±ÛÀ» ³Ñ°Üµµ ½ºÅ©·Ñ¹Ù°¡ È°¼ºÈ°¡ ¾ÈµÇ³×¿©...
¹» ´Ù¸¥°É Á¶ÀÛÇØ¾ß ÇÒÁö.. ÄÚµåÀÇ ÀϺκÐÀ» ¿Ã¸³´Ï´Ù.
ÀÌ°Å ³¾±îÁö ÇؾßÇϴµ¥..µµ¹«Áö..¸ô°Î³×¿©.. --;;;
public class ...
.....................
cg = new ccanvas();
cg.setBackground (Color.white);
cg.setSize (507,3000);
sp = new ScrollPane(ScrollPane.SCROLLBARS_ALWAYS);
sp.add(cg);
p_main_chat.add(sp);
....................
}
±×¸®°í ÀÌ ´ãÀº ĵ¹ö½º¿¡ ³»¿ë¾²´Â °Çµ¥¿©..
°Á..ĵ¹ö½º¿¡ ´ëÇÑ Á¶ÀÛ¸¸ Çϵµ·Ï Çسù½À´Ï´Ù.
class ccanvas extends Canvas{
public String[] str=new String[3000];
public int cn, x,y;
public Color c;
int h,i=0;
public int n;
public void paint(Graphics g){
for (i=1;i<=n;i++){
y = i*h+2;
if (str[i].charAt (0) =='-') c = Color.blue;
else if(str[i].charAt (0) == '+' ) c= Color.black;
else c = Color.red;
g.setColor (c);
g.drawString (str[i],3,y);
}
}
public Dimension getPreferredSize()
{
return new Dimension(500, y);
}
}
½ºÅ©·ÑÆdzÚÀ§ÀÇ Äµ¹ö½º°¡ Ä¿Áö¸é..°Á ÀÚµ¿À¸·Î ½ºÅ©·ÑÀÌ
È°¼ºÈµÇ´Â°Å ¾Æ´Ñ°¡¿©..???
±×·³..
Ä£ÀýÇϽŠºÐµéÀÌ »¡¸® ´äº¯À» ÇØÁÖ±æ ±â´Ù¸®°Ú½À´Ï´Ù..