button.addActionListener(
      new ActionListener(){
        public void actionPerformed(
                             ActionEvent e){
         if(label.isOpaque()){
            label.setOpaque(false);
            label.repaint();//render it
            ((JButton)e.getSource()).
                   setText("Make Label Opaque");
          }//end if

Figure 7