導入Java . awt . event . *;
導入javax . swing . *;
導入Java . io . *;
公共類f1擴展框架實現ActionListener
{
私有MenuBar MenuBar = new MenuBar();
私人菜單filemenu =新菜單(“文件”);
私人菜單editmenu =新菜單(“編輯”);
私人菜單formmenu =新菜單(“格式“);
private MenuItem【】itemf = new MenuItem【4】;
private MenuItem【】iteme = new MenuItem【6】;
private MenuItem【】items = new MenuItem【2】;
private TextArea TF = new TextArea();
public int a=0,b=0,c=0,style=Font。PLAIN,size = 15;
公共字符串s 1 =“red:“+a+““+“green:“+b+“+“blue“+c,
S2=“宋體“;
public String【】SZ 1 = {“10““16““24““30““32““36“},
Sz2={“宋體“、“豪放“、“幼圓“、“隸書“、“行書“、“宋體“、“格魯吉亞“},
Sz3={“加粗“、“傾斜“、“正常“、“粗傾斜“};
JDialog dialog = new JDialog(this,“font”,true);
container CP = dialog . getcontentpane();
JLabel【】lb = new JLabel【8】;
JLabel lb 1 =新JLabel(s 1,JLabel。左);
JButton b 1 =新JButton(“OK“),
B2 =新按鈕(“取消“);
JComboBox JC 1 = new JComboBox(),
jc2=new JComboBox(),
jc3 = new JComboBox();
JSC roll bar JB 1 =新JSC roll bar(JSC roll bar。水平,10,5,0,260);
JScrollBar jb2 =新JScrollBar(JScrollBar。水平,10,5,0,260);
JScrollBar jb3 =新JScrollBar(JScrollBar。水平,10,5,0,260);