|
文本编辑器源文件(java语言)(47) CheckboxGroup cbsex; Checkbox up,down,boxc; //2 radios Button OK, Cancel; //two pushbuttons GridBagConstraints gbc; GridBagLayout gbl; int dire= 1;
public outPanel(MainF fr) { super(fr,"查找",true); this.fr= fr; setFont(new Font("Helvetica", Font.PLAIN, 12)); setBackground(Color.lightGray); gbl =new GridBagLayout(); gbc = new GridBagConstraints(); setLayout(gbl); gbc.ipadx = 5; //make buttons wider gbc.ipady = 3; //make buttons higher gbc.insets.left =6; gbc.insets.right =6; gbc.insets.bottom =4; gbc.insets.top =4; gbc.weightx =1; gbc.weighty =1; lbname = new Label("查找目标:"); //label add_component(lbname, 0,0,1,1); tfname = new TextField(20); //text entry field add_component(tfname, 1,0,3,1); //panel with two buttons for sex boxc= new Checkbox("区分大小写"); add_component(boxc, 0,2,1,1);
|