title: Switch statement not incrementing correctly
body: <p>I have a button called <code>nextAd</code> that is supposed to show a different set of images each time it is clicked, but when I click it nothing comes up.</p>
  
  <p><strong>Question: Why is my <code>switch</code> statement not causing different images to show up?</strong></p>
  
  <p><strong><em>preferably without the use of an array</em></strong></p>
  
  <pre><code>  public class AdvertisementPanel extends JPanel {
  
          Advertisement apple = new Advertisement("Apple", new ImageIcon("./src/AppleAdvertisement.jpg"), new ImageIcon ("./src/AppleLogo.jpg"));
          Advertisement IBM = new Advertisement("IBM", new ImageIcon("./src/IBMAdvertisement.jpg"), new ImageIcon ("./src/IBMLogo.jpg"));
          Advertisement microsoft = new Advertisement("Microsoft", new ImageIcon("./src/MicrosoftAdvertisement.jpg"), new ImageIcon ("./src/MicrosoftLogo.jpg"));
          Advertisement samsung = new Advertisement("Samsung", new ImageIcon("./src/SamsungAdvertisement.jpg"), new ImageIcon ("./src/SamsungLogo.jpg"));
  
          JLabel appleTitle = new JLabel(apple.getTitle());
          JLabel IBMTitle = new JLabel(IBM.getTitle());
          JLabel microsoftTitle = new JLabel(microsoft.getTitle());
          JLabel samsungTitle = new JLabel(samsung.getTitle());
  
          JLabel appleAdPic = new JLabel(apple.getPicture1());
          JLabel IBMAdPic = new JLabel(IBM.getPicture1());
          JLabel microsoftAdPic = new JLabel(microsoft.getPicture1());
          JLabel samsungAdPic = new JLabel(samsung.getPicture1());
  
          JLabel appleLogo = new JLabel(apple.getPicture2());
          JLabel IBMLogo = new JLabel(IBM.getPicture2());
          JLabel microsoftLogo = new JLabel(microsoft.getPicture2());
          JLabel samsungLogo = new JLabel(samsung.getPicture2());
  
          JButton nextAd = new JButton("Click for the next advertisement");
  
          public AdvertisementPanel() 
          {
  
              //set up panel
              setPreferredSize(new Dimension(1200,1000));
              setBackground(Color.gray);
  
              //adds action listener to button
              nextAd.addActionListener(new buttonListener());
  
              //for Apple
              add(appleTitle);
              add(appleAdPic);
              add(appleLogo);
  
              //for IBM
              add(IBMTitle);
              add(IBMAdPic);
              add(IBMLogo);
              IBMTitle.setVisible(false);
              IBMAdPic.setVisible(false);
              IBMLogo.setVisible(false);
  
              //for Microsoft
              add(microsoftTitle);
              add(microsoftAdPic);
              add(microsoftLogo);
              microsoftTitle.setVisible(false);
              microsoftAdPic.setVisible(false);
              microsoftLogo.setVisible(false);
  
              //for Samsung
              add(samsungTitle);
              add(samsungAdPic);
              add(samsungLogo);
              samsungTitle.setVisible(false);
              samsungAdPic.setVisible(false);
              samsungLogo.setVisible(false);
  
              //for Button
              add(nextAd);
  
          private class buttonListener implements ActionListener
  
          {
              private int i = 0;
  
              @Override
              public void actionPerformed(ActionEvent e) 
              {
              if(e.getSource() == nextAd);    
              {
                  i++;    
              }
              switch (i){
  
              case '1': {
                  appleTitle.setVisible(false);
                  appleAdPic.setVisible(false);
                  appleLogo.setVisible(false);
                  IBMTitle.setVisible(true);
                  IBMAdPic.setVisible(true);
                  IBMLogo.setVisible(true);
                  break;
              }
              case '2':{
                  IBMAdPic.setVisible(false);
                  IBMLogo.setVisible(false);
                  microsoftAdPic.setVisible(true);
                  microsoftLogo.setVisible(true);
                  break;
              }
              case '3':{
  
                  microsoftAdPic.setVisible(false);
                  microsoftLogo.setVisible(false);
                  samsungAdPic.setVisible(true);
                  samsungLogo.setVisible(true);
                  break;
              }
      }
  </code></pre>