import java.applet.Applet;
import java.awt.*;
import java.awt.event.*;

public class RadiobuttonTesti extends Applet implements ItemListener
{
 private TextField T;
 private Font NormalFont,KalinFont,ItalicFont,KalinItalicFont;
 private Checkbox Normal,Kalin,Italic,KalinItalic;
 private CheckboxGroup fontGurubu;
 
 public void init()
 {
 
 setBackground(Color.lightGray);
 //bos textField
 T=new TextField("Buradaki yazinin degismesini izleyiniz");
 add(T);
 fontGurubu=new CheckboxGroup();
 Normal=new Checkbox("Normal",fontGurubu,true);
 Normal.addItemListener(this);
 add(Normal);
 Kalin=new Checkbox("Kalin",fontGurubu,true);
 Kalin.addItemListener(this);
 add(Kalin);
 Italic=new Checkbox("Italik",fontGurubu,true);
 Italic.addItemListener(this);
 add(Italic);
 KalinItalic=new Checkbox("Kalin Italik",fontGurubu,true);
 KalinItalic.addItemListener(this);
 add(KalinItalic);
 NormalFont=new Font("Serif",Font.PLAIN,14);
 KalinFont=new Font("Serif",Font.BOLD,14);
 ItalicFont=new Font("Serif",Font.ITALIC,14);
 KalinItalicFont=new Font("Serif",Font.BOLD+Font.ITALIC,14);
 T.setFont(NormalFont);
 }

 public void itemStateChanged(ItemEvent e)
 {
 int KalinAyari;
 if(e.getSource()== Normal)
   {T.setFont(NormalFont);}
 else if(e.getSource()== Kalin)
   {T.setFont(KalinFont);}
 else if(e.getSource()== Italic)
   {T.setFont(ItalicFont);}
 else if(e.getSource()== KalinItalic)
   {T.setFont(KalinItalicFont);}
 }

}
