public class Tools extends JPanel implements ActionListener {
private JLabel lineLabel ;
private JLabel rectLabel ;
private JLabel polyLabel ;
private JLabel ovalLabel ;
private JLabel rrectLabel;
private JLabel textLabel ;
private Handle handle;
static Color color;
public Tools(Handle handle){
this.handle = handle;
handle.setTools(this);
setLayout(null);
this.setBackground( Color.WHITE);
this.setBounds(0,4,61,500);
//Icon lineBug = new ImageIcon( getClass().getResource( "bug1.gif" ) );
//Icon rectBug = new ImageIcon( getClass().getResource( "bug2.gif" ) );
//Icon polyBug = new ImageIcon( getClass().getResource( "bug3.gif" ) );
Icon ovalBug = new ImageIcon( getClass().getResource( "bug4.gif" ) );
//Icon rrectBug = new ImageIcon( getClass().getResource( "bug5.gif" ) );
//Icon textBug = new ImageIcon( getClass().getResource( "bug6.gif" ) );
ovalLabel = new JLabel();
ovalLabel.setIcon(ovalBug);
add(ovalLabel);
validate();
}呵呵,代码,帮忙看看.