/Users/lyon/j4p/src/gui/htmlconverter/ButtonControlPanel.java

1    package gui.htmlconverter; 
2     
3    import java.awt.*; 
4    import java.awt.event.ActionEvent; 
5    import java.awt.event.ActionListener; 
6     
7    public class ButtonControlPanel 
8            extends Panel implements ActionListener { 
9     
10       J2Html parent; 
11       Button b0, b1, b2, b3; 
12    
13       public void add(Button b) { 
14           super.add(b); 
15           b.addActionListener(this); 
16       } 
17    
18       public void actionPerformed(ActionEvent e) { 
19           parent.actionPerformed(e); 
20       } 
21    
22       ButtonControlPanel(J2Html mf) { 
23           parent = mf; 
24           b0 = new Button(parent.MI_OPEN); 
25           b1 = new Button(parent.MI_SAVE); 
26           b2 = new Button(parent.MI_CONVERTALL); 
27           b3 = new Button(parent.MI_QUIT); 
28           setLayout(new FlowLayout(FlowLayout.RIGHT)); 
29           add(b0); 
30           add(b1); 
31           add(b2); 
32           add(b3); 
33    
34       } 
35    
36   } 
37