@Override
	public void actionPerformed(ActionEvent e) {
		
		
		if (e.getSource() == b1) {
			jtbExample.remove(0);
			jtbExample.remove(0);
			jtbExample.remove(0);

			jtbExample.remove(0);
			jtbExample.remove(0);
			jtbExample.remove(0);

			jplInnerPanel1 = createInnerPanel("F");
			jtbExample.addTab("Facebook", icon, jplInnerPanel1);

			jplInnerPanel2 = createInnerPanel("T");
			jtbExample.addTab("Twitter", icon, jplInnerPanel2);

			jplInnerPanel3 = createInnerPanel("S");
			jtbExample.addTab("news", icon, jplInnerPanel3);

			jplInnerPanel6 = createInnerPanel("O");
			jtbExample.addTab("theOnion", icon4, jplInnerPanel6);

			jtbExample.addTab("Interact", icon3, p);

			jplInnerPanel4 = createInnerPanel("");
			jtbExample.addTab("", icon, jplInnerPanel4);

			addIcon(lb1, icon5, 0);
			addIcon(lb2, icon1, 1);
			addIcon(lb3, icon2, 2);
			addIcon(lb5, icon4, 3);
			addIcon(lb4, icon3, 4);

			posting.setBounds(250,5,80,20);
			weather.setBounds(250,130,80,20);
			
			twitter.setBounds(10,40,80,20);
			t.setBounds(60,40,160,25);
			b2.setBounds(225,40,80,25);
			facebook.setBounds(10,80,80,20);
			t1.setBounds(80,80,160,25);
			b3.setBounds(245,80,80,25);
			
			p.add(posting);
			p.add(twitter);
			p.add(t);
			p.add(b2);
			p.add(facebook);
			p.add(t1);
			p.add(b3);
			
			city.setBounds(10,160,80,20);
			icity.setBounds(40,160,160,25);
			state.setBounds(10,200,80,20);
			istate.setBounds(45,200,160,25);
			bweather.setBounds(60,235,80,25);
			
			p.add(weather);
			p.add(city);
			p.add(icity);
			p.add(state);
			p.add(istate);
			p.add(bweather);
			//b3=facebook. b2==twitter
			b1.addActionListener(this);
			b2.addActionListener(this);
			b3.addActionListener(this);
			bweather.addActionListener(this);
			jtbExample.setTabComponentAt(5, b1);

			/*
			 * try { jtbExample.remove(0); jtbExample.remove(0);
			 * jtbExample.remove(0);
			 * 
			 * jplInnerPanel1 = createInnerPanel(bob.check());
			 * jtbExample.addTab("Facebook", icon, jplInnerPanel1);
			 * 
			 * jplInnerPanel2 = createInnerPanel(dave.check());
			 * jtbExample.addTab("Twitter", icon, jplInnerPanel2);
			 * 
			 * jplInnerPanel3 = createInnerPanel(sally.refresh());
			 * jtbExample.addTab("news", icon, jplInnerPanel3);
			 * 
			 * jtbExample.remove(0); jplInnerPanel4 = createInnerPanel("");
			 * jtbExample.addTab("", icon, jplInnerPanel4);
			 * 
			 * jtbExample.setTabComponentAt(3,b1);
			 * 
			 * addIcon(lb1,icon5,0); addIcon(lb2,icon1,1); addIcon(lb3,icon2,2);
			 * addIcon(lb4,icon3,3);
			 * 
			 * 
			 * 
			 * } catch (TwitterException | IOException | URISyntaxException |
			 * TembooException e1) { e1.printStackTrace();
			 * 
			 * }
			 */
		}

		if (e.getSource() == b2) {
			/*
			 * input=t.getText();
			 * 
			 * try {
			 * 
			 * dave.post(input); } catch (TembooException e1) {
			 * e1.printStackTrace(); }
			 * 
			 * }
			 * 
			 * if(e.getSource()==b3){ input1 = t1.getText(); try {
			 * bob.post(input1); } catch (TembooException e1) {
			 * 
			 * e1.printStackTrace(); }
			 */
		}
		if(e.getSource()==bweather){
			System.out.println("Hi");
			s = istate.getText();
			c = icity.getText();
			try {
				try {
        		    for (LookAndFeelInfo info : UIManager.getInstalledLookAndFeels()) {
        		        if ("Nimbus".equals(info.getName())) {
        		            UIManager.setLookAndFeel(info.getClassName());
        		            
        		           
        		            break;
        		        }
        		    }
        		} catch (Exception e1) {
        			try {
						UIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName());
					} catch (ClassNotFoundException | InstantiationException
							| IllegalAccessException
							| UnsupportedLookAndFeelException e2) {
						e2.printStackTrace();
					}
        		}
    			JOptionPane.showMessageDialog(frame,getW(s,c),"Weather",JOptionPane.INFORMATION_MESSAGE);				

			} catch (IOException e1) {
				e1.printStackTrace();
			}
		}
		

	}