ÇÁ·Î±×·¡¹Ö

 3206, 156/161 ȸ¿ø°¡ÀÔ  ·Î±×ÀΠ 
   poiu2069
   ÀÚ¹Ù ½º·¹µå °ü·Ã Áú¹®µå·Á¿ä!!! ºÎŹµå¸³´Ï´Ù ¤Ð¤Ð

http://www.hackerschool.org/HS_Boards/zboard.php?id=QNA_programming&no=6497 [º¹»ç]


ÀúÁ» »ì·ÁÁÖ¼¼¿ä¤Ð¤Ð

¸¶¿ì½º·Î Ŭ¸¯ÇÏ´Â À§Ä¡¿¡ ¿øÀ» ±×¸®µÇ Å©±â, »ö±ò, ¹æÇâÀ» ·£´ýÀ¸·ÎÇÏ°í

°áÁ¤µÈ ¹æÇâÀ¸·Î ¿òÁ÷ÀÌ´Ù°¡ È­¸éÀ» ¹þ¾î³ª¸é ¼Ò¸êµÇµµ·Ï Çϴµ¥

À̶§ ¿øÀÌ Ã³À½ ±×·ÁÁö´Â À§Ä¡, Å©±â. »ö±ò µîÀ» ÆÄÀÏ¿¡ ÀúÀåÇÏ´Â
°ÍÀÔ´Ï´Ù..

Àú´Â ÇϳªÀÇ ÆÐÅ°Áö¿¡ 3°¡Áö Ŭ·¡½º·Î ³ª´²¼­ Çغôµ¥ ¾Ö´Ï¸ÞÀ̼ǰú ½º·¹µå°¡ Àß ÀÌÇØ°¡¾È°¡¼­¿ä ¤Ð¤Ð

¾îµð ¹°¾î º¼¶§µµ ¾ø°í Á¤¸» ¸·¸·ÇÕ´Ï´Ù µµ¿ÍÁÖ¼¼¿ä!!

Á¦°¡ ÀÛ¼ºÇѰ͵éÀÔ´Ï´Ù(¾îµð°¡ ¹®Á¦ÀÎÁö ¸ð¸£°Ú½À´Ï´Ù...)

---¸ÞÀÎŬ·¡½º----
package Thread;

import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import javax.swing.JFrame;

public class ThreadTest extends JFrame  //¸ÞÀΠŬ·¡½º Runnable ÀÓÇø®¸ÕÆ®ÇÔ.
{
        public ThreadTest() // Test»ý¼ºÀÚ
        {
                this.setSize(800, 500);
                this.setVisible(true);
                this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                this.addMouseListener(new MouseAdapter()//¸¶¿ì½º ¸®½º³Ê
                {
                        
                        public void mouseClicked(MouseEvent e)//¸¶¿ì½º¸¦ Ŭ¸¯Çϸé
                        {
                                trd t = new trd(e.getPoint(),(int) (Math.random() * 8));//½º·¹µå »ý¼º
                                t.start();//½º·¹µå ½ÃÀÛ
                        }
                });  
        }
        
        public static void main(String args[])
        {
                new ThreadTest();
        }
}

-----½º·¹µå Ŭ·¡½º ------
package Thread;

import java.awt.Point;

public class trd extends Thread
{
        public int direction1;
        public trd(Point point, int y)
        {
                // TODO Auto-generated constructor stub
                circle c = new circle(point,y);
                direction1=y;
        }
        
        public void run()
        {

                while (true)
                {
                        try
                        {
                                Thread.sleep(30);//µô·¹ÀÌÁÖ±â
                        }
                        catch(InterruptedException ex)
                        {
                                ex.printStackTrace();
                        }
                }
        }

        public int direction;//¿øÀÌ ¿òÁ÷ÀÏ ¹æÇâ  
        public void move(int x,int y) // ¹æÇâ ÁöÁ¤
        {
                switch (direction1)//Á¤ÇØÁø ¹æÇâ¿¡ µû¶ó ¿òÁ÷ÀÓ
                {
                case 0:
                        x--;
                        break;
                case 1:
                        x++;
                        break;
                case 2:
                        y--;
                        break;
                case 3:
                        y++;
                        break;
                }
        }
}

-----circle Ŭ·¡½º------
package Thread;

import java.awt.Color;
import java.awt.Graphics;
import java.awt.Point;

class circle//ÇÑ°³ÀÇ ¿øÀ» ³ªÅ¸³»´Â Ŭ·¡½º
{
        public int w;//¿øÀÇ À§Ä¡
        public int h;//¿øÀÇ À§Ä¡
        public int size=(int)(Math.random()*100);//¿øÀÇ Å©±â
        public int r = (int)(Math.random()*256); //¿øÀÇ »ö r,g,b ·£´ý°ª
        public int g = (int)(Math.random()*256);
        public int b = (int)(Math.random()*256);
        
        public circle(Point point, int y)
        {
                // TODO Auto-generated constructor stub
                w=point.x;
                h=point.y;
        }


        public void draw(Graphics gp)//À§Ä¡¿¡ ¿ø±×¸®±â
        {         
                gp.setColor(new Color(r,g,b));
                gp.fillOval(w - (size / 2), h - (size / 2), size, size);
        }
}





  Hit : 4924     Date : 2014/12/05 09:57



    
poiu2069 ³Ê¹« ¸·¸·ÇÕ´Ï´Ù .. ÀÚ¹Ù°í¼ö´Ôµé ÀúÁ» »ì·ÁÁÖ¼¼¿ä 2014/12/05  
106   C++ À©µµ¿ì ÇÚµéÀ» ÀÌ¿ëÇÑ Ã¢ Á¦¾î..     sweetick
11/18 9470
105   ¸í·ÉÇÁ·ÒÇÁÆ®?[1]     csh2014
11/23 3194
104   C¾ð¾î ÀÌÁ¦ °« ¹è¿ì±â ½ÃÀÛÇߴµ¥ ¹®Á¦ Ǫ´Â°Å Á» µµ¿ÍÁÖ¼¼¿ä ¤Ð¤Ð[3]     johndonggyu
12/02 4364
103   ¹®ÀÚ¿­ ¹è¿­»ç¿ëÇؼ­ µ¡¼ÀÇϴ°ŠÀß ¸ð¸£°Ú¾î¿ä[1]     ÃÊ¿ìÃÊ¿ì
12/04 7493
  ÀÚ¹Ù ½º·¹µå °ü·Ã Áú¹®µå·Á¿ä!!! ºÎŹµå¸³´Ï´Ù ¤Ð¤Ð[1]     poiu2069
12/05 4923
101   1ºÎÅÍ 100±îÁöÀÇ °ö¿¡ ´ëÇÑ ÀÚ·áÇü ¹®Á¨µ¥¿ä...¤Ð¤Ð[3]     gmlthd0908
12/06 5692
100   À¥ ÇÁ·Î±×·¡¹ÖÀÌ ¹«¾ùÀΰ¡¿ä? [3]     kimhacker123
12/10 3843
99   ÇöÁ¦ ³×Æ®¿öÅ© »óȲÀε¥ ¼­·Î Á¢¼ÓÀ̾ȵǿä,,     alsrbdu
12/17 3329
98   ÇÁ·Î±×·¡¹Ö ¾ð¾î °ü·Ã Áú¹®[2]     niteofhunter
12/23 3015
97   c++ ¼ÒÄÏÇÁ·Î±×·¡¹Ö     qaz4564
01/14 7191
96   Lockbit °ü·ÃµÈ Áú¹®ÀÔ´Ï´Ù.     jkendud
01/19 3710
95   ÀÌ ¿À·ù ±Ã±ÝÇÑ°Í     dmsdls00
01/20 3433
94   ¿À·ùÄÚµåÁú¹®ÀÌ¿ä[1]     dmsdls00
01/22 3615
93   C¾ð¾î ÀÀ¿ë´É·ÂÀ» Å°¿ì±â À§ÇÑ ¹æ¹ýÀ» °¡¸£ÃÄÁֽñ⠹ٶø´Ï´Ù.[2]     OzShock
01/23 3164
92   c¾ð¾î Æ÷ÀÎÅÍ Áú¹®[5]     moomyung93
01/30 3021
91     [re] c¾ð¾î Æ÷ÀÎÅÍ Áú¹®[1]     ±èº´±Ç
01/30 3927
90   µµ´ëü.....[3]     h@cking2013
02/10 2909
89   µµ¼­°ü¿¡ ¾î¼Àºí¸® ±âÃÊ¿¡ °üÇؼ­ Áú¹®ÀÖ½À´Ï´Ù.[4]     ghgk97
02/11 3369
88   ¸Þ¸ð¸® µ¿ÀÛ °úÁ¤ Áß segment¿¡ ´ëÇؼ­..     hallohackers
02/26 3152
87   c¾ð¾î Ãʺ¸ÀÚÀε¥ ÄÄÆÄÀÏ·¯ âÀÇ ¸ð¸£´Â À̸§µé ¼³¸íÁ»¿ä[3]     songjo12
03/10 3354
[1]..[151][152][153][154][155] 156 [157][158][159][160]..[161]

Copyright 1999-2024 Zeroboard / skin by Hackerschool.org / Secure Patch by Hackerschool.org