@Override
	public void actionPerformed(ActionEvent e) {
		if(e.getSource()==confirm){
			
			
			try {
				getUser();
			} catch (IOException e1) {
				e1.printStackTrace();
			}
        	user = list.get(0).toCharArray();
        	correctPassword = list.get(1).toCharArray();
           
            char[] entereduser = username.getText().toCharArray();
            char[] enteredPassword = passwordFld.getPassword();
            
            
            if ((Arrays.equals(correctPassword, enteredPassword))&&(Arrays.equals(user, entereduser)) ){
  
            	guiFrame.dispose();
            	try {
        		    for (LookAndFeelInfo info : UIManager.getInstalledLookAndFeels()) {
        		        if ("Nimbus".equals(info.getName())) {
        		            UIManager.setLookAndFeel(info.getClassName());
        		            UIManager.getLookAndFeelDefaults().put("Panel.background", Color.BLACK);
        		           
        		            break;
        		        }
        		    }
        		} catch (Exception e1) {
        			try {
						UIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName());
					} catch (ClassNotFoundException | InstantiationException
							| IllegalAccessException
							| UnsupportedLookAndFeelException e2) {
						// TODO Auto-generated catch block
						e2.printStackTrace();
					}
        		}
            	
            	try {
					tempframe.getContentPane().add(new JTabbedPaneDemo(), BorderLayout.CENTER);
				} catch (TembooException | IOException | URISyntaxException
						| TwitterException | IllegalArgumentException | FeedException e1) {
					e1.printStackTrace();
				}
        		tempframe.setSize(600, 600);
        		tempframe.setVisible(true);
            }
            else{
    			JOptionPane.showMessageDialog(guiFrame,"Please Enter a valid username and password","Incomplete",JOptionPane.INFORMATION_MESSAGE,icon1);

               // tracker.append("\nPassword or Username is incorrect"); 
               // tracker.append("\nPlease try again. Press Help for help.");
                
            }

            Arrays.fill(enteredPassword, '0');
			
		}
		
		
		if(e.getSource()==register){
			if(getCreds()==null){
				file = new File("dp.txt");
				JLabel label1 = new JLabel("Username");
				JLabel label2 = new JLabel("Password");
				JPanel panel = new JPanel();  
				JTextField field1 = new JTextField(15);  
				panel.add(label1);
				panel.add(field1);  
				JTextField field2 = new JTextField(15); 
				panel.add(label2);
				panel.add(field2);  
				
				
				int value = JOptionPane.showConfirmDialog(guiFrame, panel, "Registration", JOptionPane.OK_CANCEL_OPTION,JOptionPane.QUESTION_MESSAGE,icon);  
				if (value == JOptionPane.OK_OPTION){  
				   inputUser = field1.getText();  
				   inputPass = field2.getText();  
				   
				    user = inputUser.toCharArray();
				    correctPassword = inputPass.toCharArray();
				    try {
						storeAccessToken();
					} catch (IOException e1) {
						e1.printStackTrace();
					}
				}  
				
			}else{
				//tracker.append("You are already registered. We Only support one user."
						//+ "\nPlease press help for more details.Then Press Register");
    			JOptionPane.showMessageDialog(guiFrame,"You are already Registered.\nPress Help for help.\nThen Register again.","Incomplete",JOptionPane.INFORMATION_MESSAGE,icon1);

			}
		}

	}