示例#1
0
文件: Button2.java 项目: ktw14/vitoex
 public void init() {
   b1.addActionListener(bl);
   b2.addActionListener(bl);
   Container cp = getContentPane();
   cp.setLayout(new FlowLayout());
   cp.add(b1);
   cp.add(b2);
   cp.add(txt);
 }
示例#2
0
文件: SineWave.java 项目: haomen/refs
 public void init() {
   Container cp = getContentPane();
   cp.add(sines);
   cycles.addChangeListener(
       new ChangeListener() {
         public void stateChanged(ChangeEvent e) {
           sines.setCycles(((JSlider) e.getSource()).getValue());
         }
       });
   cp.add(BorderLayout.SOUTH, cycles);
 }