re] Æ÷Ä¿½º À̺¥Æ®


[ ´ÙÀ½ ±Ûµé ] [ À̾ ±Û¿Ã¸®±â(´äÇϱâ) ] [ ÀÚ¹Ù ¹¯°í ´äÇϱâ ]

±Û¾´ÀÌ :±èÅÂÈÆ 1998³â 6¿ù 11ÀÏ 19:21:09

In Reply to: Æ÷Ä¿½º°¡ °¡ ÀÖ´Â ÄÄÆ÷³ÍÆ® ¾Ë¾Æ³»´Â ¹æ¹ý Á».. posted by ¹Ú¹ÎÁÖ on 1998³â 6¿ù 11ÀÏ 17:08:59:


Áú¹®¿¡ ´ëÇÑ ´äÀÌ µÉÁö ¸ð¸£°Ú½À´Ï´Ù.
´ëÃæ ¸¸µé¾ú´Âµ¥ Á¤È®È÷ ¾î¶² ÇÁ·Î±×·¥À» ¸¸µå½Ã´ÂÁö ¾Ë¸é ´õ ÀÚ¼¼È÷
¸»¾¸ÇØ µå¸±¼ö Àְڳ׿ä..
Âü°í·Î ¾Æ·¡ÀÇ ¼Ò½º´Â ºñÁÖ¿­ Ä«Æä·Î ¸¸µç °ÍÀÔ´Ï´Ù.



import java.awt.*;
import java.applet.*;


public class Applet1 extends Applet
{
public void init()
{
setLayout(null);
setSize(201,207);
button1 = new java.awt.Button();
button1.setLabel("button1");
button1.setBounds(24,36,72,36);
button1.setBackground(new Color(12632256));
add(button1);
button2 = new java.awt.Button();
button2.setLabel("button2");
button2.setBounds(108,36,72,36);
button2.setBackground(new Color(12632256));
add(button2);
button3 = new java.awt.Button();
button3.setLabel("button3");
button3.setBounds(24,84,72,36);
button3.setBackground(new Color(12632256));
add(button3);
button4 = new java.awt.Button();
button4.setLabel("button4");
button4.setBounds(108,84,72,36);
button4.setBackground(new Color(12632256));
add(button4);
textArea1 = new java.awt.TextArea("",0,0,TextArea.SCROLLBARS_NONE);
textArea1.setBounds(24,144,155,43);
add(textArea1);

//{{REGISTER_LISTENERS
SymFocus aSymFocus = new SymFocus();
button1.addFocusListener(aSymFocus);
button2.addFocusListener(aSymFocus);
button3.addFocusListener(aSymFocus);
button4.addFocusListener(aSymFocus);
label1.addFocusListener(aSymFocus);
//}}
}

//{{DECLARE_CONTROLS
java.awt.Button button1;
java.awt.Button button2;
java.awt.Button button3;
java.awt.Button button4;
java.awt.TextArea textArea1;
//}}


class SymFocus extends java.awt.event.FocusAdapter
{
public void focusGained(java.awt.event.FocusEvent event)
{
Object object = event.getSource();
if (object == button1)
button1_GotFocus(event);
else if (object == button2)
button2_GotFocus(event);
else if (object == button3)
button3_GotFocus(event);
else if (object == button4)
button4_GotFocus(event);
else if (object == label1)
label1_GotFocus(event);
}
}


void button1_GotFocus(java.awt.event.FocusEvent event)
{
// to do: code goes here.
textArea1.setText("¹öÆ° 1¿¡ focus");
}


void button2_GotFocus(java.awt.event.FocusEvent event)
{
// to do: code goes here.
textArea1.setText("¹öÆ° 2¿¡ focus");
}


void button3_GotFocus(java.awt.event.FocusEvent event)
{
// to do: code goes here.
textArea1.setText("¹öÆ° 3¿¡ Æ÷Ä¿½º");
}


void button4_GotFocus(java.awt.event.FocusEvent event)
{
// to do: code goes here.
textArea1.setText("¹öÆ° 4¿¡ Æ÷Ä¿½º");
}



}



´ÙÀ½ ±Ûµé:



À̾ ±Û¿Ã¸®±â(´äÇϱâ)

À̸§:
E-Mail:
Á¦¸ñ:
³»¿ë:
°ü·Ã URL(¼±ÅÃ):
URL Á¦¸ñ(¼±ÅÃ):
°ü·Ã À̹ÌÁö URL:


[ ´ÙÀ½ ±Ûµé ] [ À̾ ±Û¿Ã¸®±â(´äÇϱâ) ] [ ÀÚ¹Ù ¹¯°í ´äÇϱâ ]