Example #1
0
 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);
 }
Example #2
0
 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);
 }