public TQC302()
{
super("字體設定選擇器");
Container c = getContentPane();
c.setLayout(new FlowLayout());
tf=new JTextField("Just a font Tester", 20);
tf.setFont(new Font("Serif",Font.PLAIN,14));
//選項鈕
/*
請在此處加上程式碼,您必須
1、設定核取方塊
*/
buttonGroup = new ButtonGroup();
leftRadio = new JRadioButton("靠左對齊",true);
centerRadio = new JRadioButton("置中對齊");
rightRadio = new JRadioButton("靠右對齊");
buttonGroup.add(leftRadio);
buttonGroup.add(centerRadio);
buttonGroup.add(rightRadio);
//核取方塊
/*
請在此處加上程式碼,您必須
1、設定核取方塊
*/
boldBox = new JCheckBox("粗體");
italicBox = new JCheckBox("斜體");