/**
 * This is the GUI class that allows the user to select the files to use for steganographic content 
 * 
 * @author Solomon S
 * 
 */

package StegoGUI;



import stego.Drivers;
import stego.StegoCaller.Caller_StegoEmbedder;
import stego.StegoCreator.StegoEmbedder;
import stego.StegoCreator.StegoExtractor;

import java.awt.*;
import java.io.*;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import java.awt.FlowLayout;
import javax.swing.JLabel;
import java.awt.GridLayout;

import javax.swing.JFileChooser;
import javax.swing.JOptionPane;
import javax.swing.JTextField;
import javax.swing.JButton;
import javax.swing.SwingConstants;
import javax.swing.JScrollPane;
import javax.swing.ScrollPaneConstants;
import javax.swing.UIManager;
import javax.swing.border.BevelBorder;
import java.awt.event.*;
import java.util.*;

import javax.swing.JProgressBar;
import javax.swing.JTextPane;
import javax.swing.border.CompoundBorder;
import javax.swing.*;

//import crypto.RSA.*;
import stego.StegoReComposer.*;
import stego.StegoCaller.*;
import java.awt.Font;
import java.awt.Checkbox;
import javax.swing.border.TitledBorder;

public class StegoFileSelection extends JFrame implements ActionListener, KeyListener, ItemListener
{

	Caller_StegoEmbedder caller_StegoEmbedder = null;
	
	private JPanel contentPane;
	private JTextField jtfSourceFilePath;
	private JTextField jtfEncryptionKeyPath;
	private JLabel jlblCarrierImagePaths;
	public static JProgressBar jprogressBar;
	
	public static JTextPane jtxtpneInteractionContent;
	
	JButton jbtnAddSourceFile;
	JButton jbtnAddCarrierImagePath;
	JButton jbtnNewButton;
	JButton jbtnAddUploadCarrierAccount;
	JButton jbtnEmbedContent;
	JButton jbtnAddDirectory;
	JButton jbtnSaveTo_CSV, jbtnAddFrom_CSV;
	JButton jbtnOutputTo;
	JButton jbtnExtractContent;
	JButton jbtnGo;
	JButton jbtnSelectTopFolder;
	JButton jbtnEnterSourceText;
	JButton jbtnReComposeSourceFile;
	JButton jbtnDownloadContent;
	JButton jbtnEncryption;
	JButton jbtnEncryptionOutputDirectory;
	JButton jbtnImportKeys;
	JButton jbtnClearSourceText;
	JButton jbtnSaveSourceTextToDisk;
	JButton jbtnCookieJAR;
	
	JPanel jpnlStatusBar;
	JPanel jpnlSource;
	JLabel jlblStatus_SourceFile;
	JLabel jlblNumUploadAccounts;
	JLabel jlblNumCarrierImagePaths;
	JLabel jlblEmbed_Extract_Status;
	JLabel jlblOutputLocation;
	JLabel jlblPathToLoadedJAR_File_DownloadContent;
	JLabel jlblPathToSelectedJAR_Text_UploadDestination;
	JLabel jlblPathToSelectedJAR_UploadDestination;
	JLabel jlblUploadCarrier;
	JLabel jlblEncryptionOutputDirectory;
	
	static JLabel jlblTotalCarrierImageFileSizeAvailable;
	
	
	JComboBox jcbExternal_JAR;
	JComboBox jcbJAR_ToSendCommands;	

	JScrollPane jscrlpne_jtxtpneSourceText;
	JScrollPane jscrlpneUploadDestinationAccounts;
	JScrollPane jscrlpneCarrierImagePaths;
	JScrollPane jscrlpne_TxtPneDownloadContent;
	
	public static boolean imageSourceIsSelectedFile = false; 
	public static boolean imageSourceIsEnteredText = false;
	public static boolean loadEmbedContent = true;
	public static boolean loadExtractContent = false;
	public static boolean loadUploadContent = false;
	public static boolean loadRecomposeSourceFiles = false;
	public static boolean loadDownloadContent = false;
	public static boolean loadEncryption = false;
	public static boolean encryptSourceData = false;
	public static boolean loadCookieJAR = false;
	public static boolean algorithm_LoadInternalAlg = true;
	public static boolean algorithm_ImportExternal_JAR = false;
	
	public static boolean encryptionAlgorithm_LoadInternalAlg = true;
	public static boolean encryptionAlgorithm_ImportExternal_JAR = false;
	
	public static boolean jar_UseNative_API = true;
	public static boolean jar_UseCustomeInstructions = false;
	public static boolean jar_EnterExternalCommands = false;
	
	public static boolean encryptionAction_Encrypt = true;
	public static boolean encryptionAction_Decrypt = false;
	
	private static int encryptionKeySize = 1;
	
	byte [] sourceTextToPasteIn_JTxtPneSourceText = null;//NOT USED AT THIS TIME
	
	JPanel jpnlUploadDestinationAccounts = null;
		ArrayList<JPanel_AddCarrierImagePath_OR_UploadDestination> alUploadDownload_DestinationPanels = new ArrayList<JPanel_AddCarrierImagePath_OR_UploadDestination>();
	
	
	JPanel jpnlCarrierImagePaths = null;
		static ArrayList<JPanel_AddCarrierImagePath_OR_UploadDestination> alCarrierImagePaths_Panel = new ArrayList<JPanel_AddCarrierImagePath_OR_UploadDestination>();
	
	JPanel_AddCarrierImagePath_OR_UploadDestination embed_CookieJAR, extract_CookieJAR, encrypt_CookieJAR, decrypt_CookieJAR, upload_CookieJAR, download_CookieJAR, recompose_CookieJAR;
		
	JPanel jpnlUploadDestinationHeader = new JPanel(new BorderLayout());
		JPanel jpnlLoginName = new JPanel();
			JLabel jlblLoginName = new JLabel("Login Name", JLabel.CENTER);
		JPanel jpnlAccountTypePassword = new JPanel();
			JLabel jlblAccountTypePassword = new JLabel("Password", JLabel.CENTER);
		JPanel jpnlAccountType = new JPanel();
			JLabel jlblAccountType = new JLabel("Account Type", JLabel.CENTER);
	
	static JTextPane jtxtpneSourceText = new JTextPane();
	
    CheckboxGroup cbGroup = new CheckboxGroup();
		Checkbox cbEncryption_Disabled, cbEncryption_Enabled; 
	
	Checkbox cbEmbedContent; 
	Checkbox cbExtractContent;
	Checkbox cbUploadContent;
	Checkbox cbReComposeSourceFile;
	Checkbox cbDownloadContent;
	Checkbox cbEncryption;
	Checkbox cbCookieJAR;
	
	CheckboxGroup cbgExternalJAR = new CheckboxGroup();
		Checkbox cbUseNative_API;
		Checkbox cbUseCustomInstructions;
		Checkbox cbEnterExternalCommand;
	
	CheckboxGroup cbgAlgorithSetting = new CheckboxGroup();
		Checkbox cbDefaultInternalAlgorithm;
		Checkbox cbImportExternalJar;
		
	CheckboxGroup cbgEncryptionAction = new CheckboxGroup();
		Checkbox cbEncryptionAction_Encrypt;
		Checkbox cbEncryptionAction_Decrypt;
	
	
	private static String strMyClassName = "FrameStegoConfig.java";
	private JLabel jlblLoginAccountName;
	private JLabel jlblAccountPassword;
	private JLabel label;
	
	static File fleSourceFile = null;
	static File fleEncryptionKeyDirectoryPath = null;
	static File fleCarrierImageSaveDirectory = null;
	public static File fleEncryptionOutputDirectory = null;
	static File fleTopFolder_ToExternal_JAR = null;
	static File fleTopFolder_RecomposeSourceFile = null;
	static File fleTopFolder_Encryption_ToExternal_JAR = null;
	static File fleTopFolder_DownloadContent = null;
	static File fleGeneratedEncryptionKey = null;
	static File fleEncryptionJAR = null;
	static File fleExternalJAR = null;
	
	
	static String strSourceText = "";
	static String strPassword = "";
	
	static ArrayList<File> alEncryptionKeys = new ArrayList<File>();
		
	
	
	Color clrOriginalJButtonBackground = null;
	Color clrSelectedButton = new Color(102, 204, 153);
	private JLabel label_1;
	private JLabel label_4;
	private JLabel jlblSourceFileSize;
	private JLabel label_5;
	private static JLabel jlblTotalCarrierImageFileSizeSelectedToEmbed;
	private JLabel lblCarrierFilePath;
	private JLabel lblRemoveNode;
	private JLabel lblEmbedSize;
	
	public static boolean jProgressBarVisible = false;
	private JButton jbtnGenerateKeys;
	private JTabbedPane tabbedPane;
	private JPanel jpnlEncryption;
	private JPanel jpnlCarrierImage;
	private JPanel jpnlUploadDestination;
	private JPanel jpnlEmbed_OR_Extract;
	private JPanel jpnlDownloadContent;
	private JPanel jpnlCookieJAR; 
	private JButton jbtnUploadContent;
	private JLabel jlblTab;
	private JPanel jpnlAlgorithSettings;
	private JPanel jpnlExternalJAR;
	
	private ArrayList<File> alPath_To_JAR_Files = null;
	private ArrayList<File> alEncryptionPath_To_JAR_Files = null;
	private JLabel lblPathToDownload_Text;
	private JLabel jlblPathToDownloadContent;
	private JLabel jlblAppendIndex;
	private JTextField jtfCommands;
	private JPanel panel_1;
	private CheckboxGroup cbgt_Encryption = new CheckboxGroup();
	private Checkbox cbInternalAlg_Encryption;
	private Checkbox cbExternalAlg_Encryption;
	private JPanel panel_2;
	private JComboBox jcbSelect_JAR_Encryption;
	private JButton jbtnSelectTopFolder_Encryption;
	private JPanel panel_3;
	private JPanel panel_4;
	private JPanel panel_5;
	private JPanel panel_6;
	private JTextField jtfEncryptionKeySize;
	private JLabel jlblPathToEncryption_JAR;
	private JButton jbtnOpenFileLocation;

	te the frame.
	 */
	public StegoFileSelection() 
	{
		setTitle("SNSCat Framework");
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setBounds(100, 100, 1103, 483);
		contentPane = new JPanel();
		contentPane.setName("contentPaneMain");
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		setContentPane(contentPane);
		contentPane.setLayout(null);
		
		try 
		{

		    UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");

		} 
		catch (Exception e) 
		{
		   // handle exception
		}
		
		jbtnNewButton = new JButton("New button");
		
		jpnlStatusBar = new JPanel();
		jpnlStatusBar.setBorder(new BevelBorder(BevelBorder.LOWERED, null, null, null, null));
		jpnlStatusBar.setBounds(150, 414, 927, 20);
		contentPane.add(jpnlStatusBar);
		jpnlStatusBar.setLayout(null);
		
		jprogressBar = new JProgressBar();
		jprogressBar.setBounds(843, 3, 81, 18);
		jpnlStatusBar.add(jprogressBar);
		
		JLabel jlblSeparator1 = new JLabel("l");
		jlblSeparator1.setEnabled(false);
		jlblSeparator1.setFont(new Font("Tahoma", Font.PLAIN, 18));
		jlblSeparator1.setBounds(742, 4, 4, 14);
		jpnlStatusBar.add(jlblSeparator1);
		
		jlblStatus_SourceFile = new JLabel("None Selected", JLabel.CENTER);
		jlblStatus_SourceFile.setToolTipText("Indicates if the contents to place into the stego files come from an image or text entered by the user");
		jlblStatus_SourceFile.setBounds(670, 1, 70, 21);
		jpnlStatusBar.add(jlblStatus_SourceFile);
		
		label_1 = new JLabel("l");
		label_1.setFont(new Font("Tahoma", Font.PLAIN, 18));
		label_1.setEnabled(false);
		label_1.setBounds(665, 4, 4, 14);
		jpnlStatusBar.add(label_1);
		
		JLabel label_2 = new JLabel("l");
		label_2.setFont(new Font("Tahoma", Font.PLAIN, 18));
		label_2.setEnabled(false);
		label_2.setBounds(594, 5, 4, 14);
		jpnlStatusBar.add(label_2);
		
		jlblNumUploadAccounts = new JLabel("0", SwingConstants.CENTER);
		jlblNumUploadAccounts.setToolTipText("Indicates if the contents to place into the stego files come from an image or text entered by the user");
		jlblNumUploadAccounts.setBounds(599, 1, 70, 21);
		jpnlStatusBar.add(jlblNumUploadAccounts);
		
		JLabel label_3 = new JLabel("l");
		label_3.setFont(new Font("Tahoma", Font.PLAIN, 18));
		label_3.setEnabled(false);
		label_3.setBounds(523, 5, 4, 14);
		jpnlStatusBar.add(label_3);
		
		jlblNumCarrierImagePaths = new JLabel("0", SwingConstants.CENTER);
		jlblNumCarrierImagePaths.setToolTipText("Indicates if the contents to place into the stego files come from an image or text entered by the user");
		jlblNumCarrierImagePaths.setBounds(528, 1, 70, 21);
		jpnlStatusBar.add(jlblNumCarrierImagePaths);
		
		label_4 = new JLabel("l");
		label_4.setFont(new Font("Tahoma", Font.PLAIN, 18));
		label_4.setEnabled(false);
		label_4.setBounds(279, 5, 4, 14);
		jpnlStatusBar.add(label_4);
		
		jlblSourceFileSize = new JLabel("Select", SwingConstants.CENTER);
		jlblSourceFileSize.setToolTipText("Specifies Source to Embed Content Size");
		jlblSourceFileSize.setBounds(279, 1, 74, 21);
		jpnlStatusBar.add(jlblSourceFileSize);
		
		label_5 = new JLabel("l");
		label_5.setFont(new Font("Tahoma", Font.PLAIN, 18));
		label_5.setEnabled(false);
		label_5.setBounds(450, 5, 4, 14);
		jpnlStatusBar.add(label_5);
		
		jlblTotalCarrierImageFileSizeSelectedToEmbed = new JLabel("Select", SwingConstants.CENTER);
		jlblTotalCarrierImageFileSizeSelectedToEmbed.setToolTipText("Specifies total size selected by user in all Carrier Image Files to embed content");
		jlblTotalCarrierImageFileSizeSelectedToEmbed.setBounds(452, 1, 75, 21);
		jpnlStatusBar.add(jlblTotalCarrierImageFileSizeSelectedToEmbed);
		
		JLabel label_6 = new JLabel("l");
		label_6.setFont(new Font("Tahoma", Font.PLAIN, 18));
		label_6.setEnabled(false);
		label_6.setBounds(363, 5, 4, 14);
		jpnlStatusBar.add(label_6);
		
		jlblTotalCarrierImageFileSizeAvailable = new JLabel("0 B", SwingConstants.CENTER);
		jlblTotalCarrierImageFileSizeAvailable.setToolTipText("Specifies total size available in all Carrier Image Files selected");
		jlblTotalCarrierImageFileSizeAvailable.setBounds(365, 1, 75, 21);
		jpnlStatusBar.add(jlblTotalCarrierImageFileSizeAvailable);
		
		jlblEmbed_Extract_Status = new JLabel("Embed", SwingConstants.CENTER);
		jlblEmbed_Extract_Status.setFont(new Font("Tahoma", Font.BOLD, 11));
		jlblEmbed_Extract_Status.setForeground(Color.red);
		jlblEmbed_Extract_Status.setToolTipText("Indicates if the contents to place into the stego files come from an image or text entered by the user");
		jlblEmbed_Extract_Status.setBounds(747, 1, 86, 21);
		jpnlStatusBar.add(jlblEmbed_Extract_Status);
		
		JLabel label_9 = new JLabel("l");
		label_9.setFont(new Font("Tahoma", Font.PLAIN, 18));
		label_9.setEnabled(false);
		label_9.setBounds(833, 4, 4, 14);
		jpnlStatusBar.add(label_9);
		
		JLabel label_7 = new JLabel("l");
		label_7.setFont(new Font("Tahoma", Font.PLAIN, 18));
		label_7.setEnabled(false);
		label_7.setBounds(209, 5, 4, 14);
		jpnlStatusBar.add(label_7);
		
		JLabel label_8 = new JLabel("Select", SwingConstants.CENTER);
		label_8.setToolTipText("Specifies Source Image Size");
		label_8.setBounds(209, 1, 74, 21);
		label_8.setVisible(false);
		jpnlStatusBar.add(label_8);
		
		
		jpnlEncryption = new JPanel();
		jpnlEncryption.setBounds(359, 279, 454, 199);
		//contentPane.add(jpnlEncryption);
		jpnlEncryption.setLayout(null);
		
		
		jpnlLoginName.add(jlblLoginName);
		jpnlAccountTypePassword.add(jlblAccountTypePassword);
		jpnlAccountType.add(jlblAccountType);
		
		jpnlUploadDestinationHeader.add(BorderLayout.WEST, this.jpnlLoginName);
		jpnlUploadDestinationHeader.add(BorderLayout.CENTER, this.jpnlAccountTypePassword);
		jpnlUploadDestinationHeader.add(BorderLayout.EAST, this.jpnlAccountType);
		
		
		
		jpnlCarrierImage = new JPanel();
		jpnlCarrierImage.setBounds(335, 280, 504, 231);
		//contentPane.add(jpnlCarrierImage);
		jpnlCarrierImage.setLayout(null);
		
		jlblCarrierImagePaths = new JLabel("<html> <b><u>Carrier Image Path(s) </b></u></html>", SwingConstants.CENTER);
		jlblCarrierImagePaths.setBounds(0, 0, 153, 17);
		jpnlCarrierImage.add(jlblCarrierImagePaths);
		
		JLabel jlblBrowse = new JLabel("Browse", SwingConstants.CENTER);
		jlblBrowse.setBounds(50, 21, 44, 20);
		jpnlCarrierImage.add(jlblBrowse);
		
		lblCarrierFilePath = new JLabel("Carrier File Path", SwingConstants.CENTER);
		lblCarrierFilePath.setBounds(354, 21, 100, 20);
		jpnlCarrierImage.add(lblCarrierFilePath);
		
		lblRemoveNode = new JLabel("Remove", SwingConstants.CENTER);
		lblRemoveNode.setBounds(696, 21, 44, 20);
		jpnlCarrierImage.add(lblRemoveNode);
		lblRemoveNode.setToolTipText("Specifies to add the path of a carrier image or remove a carrier image");
		
		lblEmbedSize = new JLabel("Content Size", SwingConstants.CENTER);
		lblEmbedSize.setBounds(774, 21, 80, 20);
		jpnlCarrierImage.add(lblEmbedSize);
		lblEmbedSize.setToolTipText("Specifies the number of bytes to embed within the carrier image file");
		
		jscrlpneCarrierImagePaths = new JScrollPane();
		jscrlpneCarrierImagePaths.setBounds(10, 45, 896, 233);
		jpnlCarrierImage.add(jscrlpneCarrierImagePaths);
		jscrlpneCarrierImagePaths.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
		
		jbtnAddCarrierImagePath = new JButton("Add Image");
		jbtnAddCarrierImagePath.setBounds(12, 289, 442, 23);
		jpnlCarrierImage.add(jbtnAddCarrierImagePath);
		
		jbtnAddDirectory = new JButton("Add Directory");
		jbtnAddDirectory.setBounds(464, 289, 442, 23);
		jpnlCarrierImage.add(jbtnAddDirectory);
		jbtnAddDirectory.setToolTipText("Can Specify a directory of Carrier Images to use. NOTE: Will only list 1 directory deep.");
		this.jbtnAddDirectory.addActionListener(this);
		this.jbtnAddCarrierImagePath.addActionListener(this);
		
		tabbedPane = new JTabbedPane(JTabbedPane.LEFT);
		tabbedPane.setBounds(21, 8, 1059, 328);
		
		
		
		jpnlUploadDestination = new JPanel();
		jpnlUploadDestination.setBounds(539, 65, 584, 331);
		jpnlUploadDestination.setLayout(null);
		
		jscrlpneUploadDestinationAccounts = new JScrollPane();
		jscrlpneUploadDestinationAccounts.setBounds(10, 45, 896, 213);
		jpnlUploadDestination.add(jscrlpneUploadDestinationAccounts);
		jscrlpneUploadDestinationAccounts.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
		
		
		jlblLoginAccountName = new JLabel("Login Name", JLabel.CENTER);
		jlblLoginAccountName.setBounds(195, 21, 62, 20);
		jpnlUploadDestination.add(jlblLoginAccountName);
		
		jlblAccountPassword = new JLabel("Password", SwingConstants.CENTER);
		jlblAccountPassword.setBounds(327, 21, 69, 20);
		jpnlUploadDestination.add(jlblAccountPassword);
		
		label = new JLabel("Account Type", SwingConstants.CENTER);
		label.setBounds(626, 21, 80, 20);
		jpnlUploadDestination.add(label);
		
		JLabel lblRemove = new JLabel("Remove", SwingConstants.CENTER);
		lblRemove.setBounds(822, 21, 46, 20);
		jpnlUploadDestination.add(lblRemove);
		
		jlblUploadCarrier = new JLabel("<html> <b><u>Upload Destination</b></u></html>", SwingConstants.CENTER);
		jlblUploadCarrier.setBounds(0, 0, 153, 17);
		jpnlUploadDestination.add(jlblUploadCarrier);
		
		
		jbtnAddUploadCarrierAccount = new JButton("Add Account");
		jbtnAddUploadCarrierAccount.setBounds(12, 264, 290, 23);
		jpnlUploadDestination.add(jbtnAddUploadCarrierAccount);
		
		jbtnAddFrom_CSV = new JButton("Add Accounts From CSV File");
		jbtnAddFrom_CSV.setBounds(316, 264, 290, 23);
		jbtnAddFrom_CSV.setEnabled(false);
		jpnlUploadDestination.add(jbtnAddFrom_CSV);
		jbtnAddFrom_CSV.setToolTipText("Specify to read a CSV file  <Login Name>, <Password>, <Account URL> and input results above");
		
		jbtnSaveTo_CSV = new JButton("Save Accounts To CSV File");
		jbtnSaveTo_CSV.setEnabled(false);
		jbtnSaveTo_CSV.setBounds(616, 264, 290, 23);
		jpnlUploadDestination.add(jbtnSaveTo_CSV);
		jbtnSaveTo_CSV.setToolTipText("Specify to write the above Account Information into a CSV file");
		this.jbtnSaveTo_CSV.addActionListener(this);
		this.jbtnAddFrom_CSV.addActionListener(this);
		this.jbtnAddUploadCarrierAccount.addActionListener(this);
		
		jpnlEmbed_OR_Extract = new JPanel();
		jpnlEmbed_OR_Extract.setBounds(902, 146, 23, 39);
		tabbedPane.addTab("Action", this.jpnlEmbed_OR_Extract);
		jpnlEmbed_OR_Extract.setLayout(null);
		
		CheckboxGroup cbgEmbedExtract = new CheckboxGroup();
		
				
		JPanel jpnlActionOptions = new JPanel();
		jpnlActionOptions.setBorder(new TitledBorder(null, "Action", TitledBorder.LEADING, TitledBorder.TOP, null, null));
		jpnlActionOptions.setBounds(10, 8, 898, 63);
		jpnlEmbed_OR_Extract.add(jpnlActionOptions);
		jpnlActionOptions.setLayout(null);
		
		cbEmbedContent = new Checkbox("Embed Content", cbgEmbedExtract, true);
		cbEmbedContent.setBounds(54, 24, 105, 22);
		jpnlActionOptions.add(cbEmbedContent);
		cbEmbedContent.setFont(new Font("Dialog", Font.PLAIN, 12));
		
		
		cbExtractContent = new Checkbox("Extract Content", cbgEmbedExtract, false);
		cbExtractContent.setBounds(165, 24, 105, 22);
		jpnlActionOptions.add(cbExtractContent);
		cbExtractContent.setFont(new Font("Dialog", Font.PLAIN, 12));
		
		cbUploadContent = new Checkbox("Upload Content", cbgEmbedExtract, false);
		cbUploadContent.setBounds(387, 24, 105, 22);
		jpnlActionOptions.add(cbUploadContent);
		cbUploadContent.setFont(new Font("Dialog", Font.PLAIN, 12));
		
		cbReComposeSourceFile = new Checkbox("Re-Compose Source File(s)", cbgEmbedExtract, false);
		cbReComposeSourceFile.setFont(new Font("Dialog", Font.PLAIN, 12));
		cbReComposeSourceFile.setBounds(625, 24, 174, 22);
		cbReComposeSourceFile.addItemListener(this);
		jpnlActionOptions.add(cbReComposeSourceFile);
		
		cbDownloadContent = new Checkbox("Download Content", cbgEmbedExtract, false);
		cbDownloadContent.setFont(new Font("Dialog", Font.PLAIN, 12));
		cbDownloadContent.setBounds(498, 24, 121, 22);
		cbDownloadContent.addItemListener(this);
		jpnlActionOptions.add(cbDownloadContent);
		
		cbEncryption = new Checkbox("Encrypt / Decrypt", cbgEmbedExtract, false);
		cbEncryption.setFont(new Font("Dialog", Font.PLAIN, 12));
		cbEncryption.setBounds(276, 24, 105, 22);
		cbEncryption.addItemListener(this);
		jpnlActionOptions.add(cbEncryption);
		
		cbCookieJAR = new Checkbox("Cookie JAR", cbgEmbedExtract, false);
		cbCookieJAR.setFont(new Font("Dialog", Font.PLAIN, 12));
		cbCookieJAR.setBounds(805, 24, 83, 22);
		cbCookieJAR.addItemListener(this);
		jpnlActionOptions.add(cbCookieJAR);
		
		jpnlAlgorithSettings = new JPanel();
		jpnlAlgorithSettings.setBorder(new TitledBorder(null, "Algorithm Settings", TitledBorder.LEADING, TitledBorder.TOP, null, null));
		jpnlAlgorithSettings.setBounds(10, 78, 898, 69);
		jpnlEmbed_OR_Extract.add(jpnlAlgorithSettings);
		jpnlAlgorithSettings.setLayout(null);
		
		cbDefaultInternalAlgorithm = new Checkbox("Default Internal Algorithm", cbgAlgorithSetting, true);
		cbDefaultInternalAlgorithm.setBounds(212, 26, 245, 22);
		cbDefaultInternalAlgorithm.addItemListener(this);
		jpnlAlgorithSettings.add(cbDefaultInternalAlgorithm);
		cbDefaultInternalAlgorithm.setFont(new Font("Dialog", Font.PLAIN, 20));
		
		cbImportExternalJar = new Checkbox("Import External JAR", cbgAlgorithSetting, false);
		cbImportExternalJar.setBounds(480, 26, 228, 22);
		cbImportExternalJar.addItemListener(this);
		jpnlAlgorithSettings.add(cbImportExternalJar);
		cbImportExternalJar.setFont(new Font("Dialog", Font.PLAIN, 20));
		
		jpnlExternalJAR = new JPanel();
		jpnlExternalJAR.setBorder(new TitledBorder(UIManager.getBorder("TitledBorder.border"), "Select External JAR (If Applicable)", TitledBorder.LEADING, TitledBorder.TOP, null, null));
		jpnlExternalJAR.setBounds(10, 152, 898, 88);
		jpnlEmbed_OR_Extract.add(jpnlExternalJAR);
		jpnlExternalJAR.setLayout(null);
		
		jcbExternal_JAR = new JComboBox();
		jcbExternal_JAR.setBounds(165, 33, 536, 23);
		jpnlExternalJAR.add(jcbExternal_JAR);
		
		jbtnSelectTopFolder = new JButton("Select Top Folder");
		jbtnSelectTopFolder.setBounds(45, 33, 115, 23);
		jbtnSelectTopFolder.addActionListener(this);
		jpnlExternalJAR.add(jbtnSelectTopFolder);
		
		cbUseNative_API = new Checkbox("Use Native API", cbgExternalJAR, true);
		cbUseNative_API.setBounds(714, 10, 144, 22);
		cbUseNative_API.addItemListener(this);
		jpnlExternalJAR.add(cbUseNative_API);
		
		cbUseCustomInstructions = new Checkbox("Use Custom Instructions", cbgExternalJAR, false);
		cbUseCustomInstructions.setBounds(714, 31, 147, 22);
		cbUseCustomInstructions.addItemListener(this);
		jpnlExternalJAR.add(cbUseCustomInstructions);
		
		cbEnterExternalCommand = new Checkbox("Enter External Commands", cbgExternalJAR, false);
		cbEnterExternalCommand.setBounds(714, 51, 147, 22);
		jpnlExternalJAR.add(cbEnterExternalCommand);
		
		JPanel panel_9 = new JPanel();
		panel_9.setBorder(new TitledBorder(UIManager.getBorder("TitledBorder.border"), "Quick Launch Buttons", TitledBorder.LEADING, TitledBorder.TOP, null, null));
		panel_9.setLayout(null);
		panel_9.setEnabled(false);
		panel_9.setBounds(10, 248, 898, 64);
		jpnlEmbed_OR_Extract.add(panel_9);
		
		jbtnEmbedContent = new JButton("Embed Content");
		jbtnEmbedContent.setBounds(7, 23, 121, 23);
		panel_9.add(jbtnEmbedContent);
		jbtnEmbedContent.setFont(new Font("Segoe UI", Font.PLAIN, 12));
		jbtnEmbedContent.setForeground(Color.BLACK);
		jbtnEmbedContent.setBackground(SystemColor.activeCaption);
		jbtnEmbedContent.setToolTipText("Embed the information within the carrier image(s)");
		//contentPane.add(jpnlEmbed_OR_Extract);
		
		jbtnExtractContent = new JButton("Extract Content");
		jbtnExtractContent.setBounds(130, 23, 113, 23);
		panel_9.add(jbtnExtractContent);
		jbtnExtractContent.setToolTipText("Extract the information within the carrier image(s)");
		jbtnExtractContent.setForeground(Color.BLACK);
		jbtnExtractContent.setFont(new Font("Segoe UI", Font.PLAIN, 12));
		jbtnExtractContent.setBackground(SystemColor.activeCaption);
		
		jbtnEncryption = new JButton("Encrypt / Decrypt");
		jbtnEncryption.setBounds(244, 23, 135, 23);
		panel_9.add(jbtnEncryption);
		jbtnEncryption.setToolTipText("Encrypt/Decrypt content to embed/extract data from the carrier image(s)");
		jbtnEncryption.setForeground(Color.BLACK);
		jbtnEncryption.setFont(new Font("Segoe UI", Font.PLAIN, 12));
		jbtnEncryption.setBackground(SystemColor.activeCaption);
		
		jbtnUploadContent = new JButton("Upload Content");
		jbtnUploadContent.setBounds(380, 23, 121, 23);
		panel_9.add(jbtnUploadContent);
		jbtnUploadContent.setToolTipText("Extract the information within the carrier image(s)");
		jbtnUploadContent.setForeground(Color.BLACK);
		jbtnUploadContent.setFont(new Font("Segoe UI", Font.PLAIN, 12));
		jbtnUploadContent.setBackground(SystemColor.activeCaption);
		
		jbtnDownloadContent = new JButton("Download Content");
		jbtnDownloadContent.setBounds(502, 23, 135, 23);
		panel_9.add(jbtnDownloadContent);
		jbtnDownloadContent.setToolTipText("Extract the information within the carrier image(s)");
		jbtnDownloadContent.setForeground(Color.BLACK);
		jbtnDownloadContent.setFont(new Font("Segoe UI", Font.PLAIN, 12));
		jbtnDownloadContent.setBackground(SystemColor.activeCaption);
		
		jbtnReComposeSourceFile = new JButton("Re-Compose File(s)");
		jbtnReComposeSourceFile.setBounds(638, 23, 135, 23);
		panel_9.add(jbtnReComposeSourceFile);
		jbtnReComposeSourceFile.setToolTipText("Extract the information within the carrier image(s)");
		jbtnReComposeSourceFile.setForeground(Color.BLACK);
		jbtnReComposeSourceFile.setFont(new Font("Segoe UI", Font.PLAIN, 12));
		jbtnReComposeSourceFile.setBackground(SystemColor.activeCaption);
		
		jbtnCookieJAR = new JButton("Cookie JAR");
		jbtnCookieJAR.setToolTipText("Extract the information within the carrier image(s)");
		jbtnCookieJAR.setForeground(Color.BLACK);
		jbtnCookieJAR.setFont(new Font("Segoe UI", Font.PLAIN, 12));
		jbtnCookieJAR.setBackground(SystemColor.activeCaption);
		jbtnCookieJAR.setBounds(777, 23, 108, 23);
		jbtnCookieJAR.addActionListener(this);
		panel_9.add(jbtnCookieJAR);
		jbtnReComposeSourceFile.addActionListener(this);
		jbtnDownloadContent.addActionListener(this);
		jbtnUploadContent.addActionListener(this);
		jbtnEncryption.addActionListener(this);
		
		this.jbtnExtractContent.addActionListener(this);
		this.jbtnEmbedContent.addActionListener(this);
		cbEnterExternalCommand.addItemListener(this);
		cbUploadContent.addItemListener(this);
		cbExtractContent.addItemListener(this);
		cbEmbedContent.addItemListener(this);
		
		jpnlSource = new JPanel();
		jpnlSource.setBounds(323, 252, 596, 257);
		//contentPane.add(jpnlSource);
		jpnlSource.setLayout(null);
		tabbedPane.addTab("Source Data", this.jpnlSource);
		
		panel_4 = new JPanel();
		panel_4.setBorder(new TitledBorder(null, "Source File Path", TitledBorder.LEADING, TitledBorder.TOP, null, null));		
		panel_4.setLayout(null);
		panel_4.setBounds(10, 8, 898, 63);
		jpnlSource.add(panel_4);
		
		jbtnAddSourceFile = new JButton("Add File");
		jbtnAddSourceFile.setBounds(54, 25, 105, 23);
		panel_4.add(jbtnAddSourceFile);
		
		jtfSourceFilePath = new JTextField();
		jtfSourceFilePath.setBounds(165, 25, 710, 20);
		panel_4.add(jtfSourceFilePath);
		jtfSourceFilePath.setBackground(SystemColor.scrollbar);
		jtfSourceFilePath.setEditable(false);
		jtfSourceFilePath.setToolTipText("Path to Source File");
		jtfSourceFilePath.setColumns(10);
		
		panel_5 = new JPanel();
		panel_5.setBorder(new TitledBorder(null, "Image/Package Output Directory Path", TitledBorder.LEADING, TitledBorder.TOP, null, null));
		panel_5.setLayout(null);
		panel_5.setBounds(10, 248, 898, 63);
		jpnlSource.add(panel_5);
		
		jbtnOutputTo = new JButton("Output To...");
		jbtnOutputTo.setBounds(54, 25, 105, 23);
		panel_5.add(jbtnOutputTo);
		jbtnOutputTo.setToolTipText("Specifies the location to output the images with the embedded stego content");
		jbtnOutputTo.setForeground(Color.BLACK);
		jbtnOutputTo.setFont(new Font("Tahoma", Font.PLAIN, 11));
		jbtnOutputTo.setBackground(Color.WHITE);
		
		jlblOutputLocation = new JLabel("Specify Output Location...");
		jlblOutputLocation.setBounds(165, 28, 568, 14);
		panel_5.add(jlblOutputLocation);
		jlblOutputLocation.setToolTipText("Specify Output Location");
		
		jbtnOpenFileLocation = new JButton("Open File Location");
		jbtnOpenFileLocation.setBounds(743, 25, 145, 23);
		jbtnOpenFileLocation.addActionListener(this);
		panel_5.add(jbtnOpenFileLocation);
		
		panel_6 = new JPanel();
		panel_6.setBorder(new TitledBorder(null, "Source Text", TitledBorder.LEADING, TitledBorder.TOP, null, null));
		panel_6.setLayout(null);
		panel_6.setBounds(10, 78, 898, 171);
		jpnlSource.add(panel_6);
		
		jbtnEnterSourceText = new JButton("Enter Text");
		jbtnEnterSourceText.setBounds(52, 17, 105, 23);
		panel_6.add(jbtnEnterSourceText);
		jtxtpneSourceText.setBackground(SystemColor.scrollbar);
		jtxtpneSourceText.setEditable(false);
		
		
				
		jtxtpneSourceText.setToolTipText("Enter/Paste Text Here");
		
		jscrlpne_jtxtpneSourceText = new JScrollPane(jtxtpneSourceText);
		jscrlpne_jtxtpneSourceText.setBounds(163, 17, 710, 122);
		panel_6.add(jscrlpne_jtxtpneSourceText);
		jscrlpne_jtxtpneSourceText.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
		jscrlpne_jtxtpneSourceText.setBorder(new CompoundBorder(new BevelBorder(BevelBorder.RAISED, null, null, null, null), new BevelBorder(BevelBorder.LOWERED, null, null, null, null)));
		
		jbtnSaveSourceTextToDisk = new JButton("Save Source Text to Disk");
		jbtnSaveSourceTextToDisk.setBounds(163, 142, 350, 23);
		jbtnSaveSourceTextToDisk.addActionListener(this);
		panel_6.add(jbtnSaveSourceTextToDisk);
		
		jbtnClearSourceText = new JButton("Clear Source Data");
		jbtnClearSourceText.setBounds(523, 142, 350, 23);
		jbtnClearSourceText.addActionListener(this);
		panel_6.add(jbtnClearSourceText);
		
		
		jtxtpneSourceText.addKeyListener(this);
		this.jbtnEnterSourceText.addActionListener(this);
		this.jbtnOutputTo.addActionListener(this);
		clrOriginalJButtonBackground = this.jbtnAddSourceFile.getBackground();
		
		this.jbtnAddSourceFile.addActionListener(this);
		
		this.jpnlDownloadContent = new JPanel();
		jpnlDownloadContent.setBounds(902, 146, 23, 39);
		
		
		
		tabbedPane.addTab("Encryption", this.jpnlEncryption);
		
		JPanel panel = new JPanel();
		panel.setBorder(new TitledBorder(null, "Encryption State", TitledBorder.LEADING, TitledBorder.TOP, null, null));
		panel.setBounds(10, 8, 212, 63);
		jpnlEncryption.add(panel);
		panel.setLayout(null);
		
		cbEncryption_Enabled = new Checkbox("Enabled", cbGroup, false);
		cbEncryption_Enabled.setBounds(10, 24, 90, 22);
		panel.add(cbEncryption_Enabled);
		cbEncryption_Enabled.setFont(new Font("Dialog", Font.PLAIN, 20));
		
		cbEncryption_Disabled = new Checkbox("Disabled", cbGroup, true);
		cbEncryption_Disabled.setBounds(108, 24, 94, 22);
		panel.add(cbEncryption_Disabled);
		cbEncryption_Disabled.setFont(new Font("Dialog", Font.PLAIN, 20));
		
		panel_1 = new JPanel();
		panel_1.setBorder(new TitledBorder(null, "Encryption Algorithm", TitledBorder.LEADING, TitledBorder.TOP, null, null));
		panel_1.setLayout(null);
		panel_1.setBounds(446, 8, 462, 63);
		jpnlEncryption.add(panel_1);
		
		cbInternalAlg_Encryption = new Checkbox("Default Internal Algorithm", cbgt_Encryption, true);
		cbInternalAlg_Encryption.setEnabled(false);
		cbInternalAlg_Encryption.setFont(new Font("Dialog", Font.PLAIN, 20));
		cbInternalAlg_Encryption.setBounds(10, 26, 245, 22);
		cbInternalAlg_Encryption.addItemListener(this);
		panel_1.add(cbInternalAlg_Encryption);
		
		cbExternalAlg_Encryption = new Checkbox("Import External JAR", cbgt_Encryption, false);
		cbExternalAlg_Encryption.setEnabled(false);
		cbExternalAlg_Encryption.setFont(new Font("Dialog", Font.PLAIN, 20));
		cbExternalAlg_Encryption.setBounds(261, 26, 196, 22);
		cbExternalAlg_Encryption.addItemListener(this);
		panel_1.add(cbExternalAlg_Encryption);
		
		panel_2 = new JPanel();
		panel_2.setBorder(new TitledBorder(UIManager.getBorder("TitledBorder.border"), "Select External Encryption JAR (If Applicable)", TitledBorder.LEADING, TitledBorder.TOP, null, null));
		panel_2.setLayout(null);
		panel_2.setEnabled(false);
		panel_2.setBounds(10, 78, 898, 91);
		jpnlEncryption.add(panel_2);
		
		jcbSelect_JAR_Encryption = new JComboBox();
		jcbSelect_JAR_Encryption.setEnabled(false);
		jcbSelect_JAR_Encryption.setBounds(165, 40, 710, 23);
		panel_2.add(jcbSelect_JAR_Encryption);
		
		jbtnSelectTopFolder_Encryption = new JButton("Select Top Folder");
		jbtnSelectTopFolder_Encryption.setEnabled(false);
		jbtnSelectTopFolder_Encryption.setBounds(34, 40, 115, 23);
		this.jbtnSelectTopFolder_Encryption.addActionListener(this);
		panel_2.add(jbtnSelectTopFolder_Encryption);
		
		panel_3 = new JPanel();
		panel_3.setBorder(new TitledBorder(UIManager.getBorder("TitledBorder.border"), "Generate Encryption Keys (If Applicable)", TitledBorder.LEADING, TitledBorder.TOP, null, null));
		panel_3.setLayout(null);
		panel_3.setEnabled(false);
		panel_3.setBounds(10, 180, 898, 69);
		jpnlEncryption.add(panel_3);
		
		jbtnGenerateKeys = new JButton("Generate Keys");
		jbtnGenerateKeys.setEnabled(false);
		jbtnGenerateKeys.setBounds(255, 33, 103, 23);
		panel_3.add(jbtnGenerateKeys);
		
		jtfEncryptionKeyPath = new JTextField();
		jtfEncryptionKeyPath.setBounds(360, 34, 516, 20);
		panel_3.add(jtfEncryptionKeyPath);
		jtfEncryptionKeyPath.setBackground(Color.WHITE);
		jtfEncryptionKeyPath.setEditable(false);
		jtfEncryptionKeyPath.setToolTipText("Path to the Encryption Keys Folder");
		jtfEncryptionKeyPath.setColumns(10);
		
		JLabel lblNewLabel = new JLabel("Key Size (Bytes)");
		lblNewLabel.setBounds(135, 34, 78, 21);
		panel_3.add(lblNewLabel);
		
		jtfEncryptionKeySize = new JTextField();
		jtfEncryptionKeySize.setEnabled(false);
		jtfEncryptionKeySize.setBounds(215, 34, 38, 20);
		panel_3.add(jtfEncryptionKeySize);
		jtfEncryptionKeySize.setColumns(10);
		
		jbtnImportKeys = new JButton("Import Keys");
		jbtnImportKeys.setEnabled(false);
		jbtnImportKeys.setBounds(34, 30, 91, 23);
		jbtnImportKeys.addActionListener(this);
		panel_3.add(jbtnImportKeys);
		
		JPanel panel_7 = new JPanel();
		panel_7.setBorder(new TitledBorder(UIManager.getBorder("TitledBorder.border"), "Output Directory Path", TitledBorder.LEADING, TitledBorder.TOP, null, null));
		panel_7.setLayout(null);
		panel_7.setBounds(10, 248, 898, 63);
		jpnlEncryption.add(panel_7);
		
		jbtnEncryptionOutputDirectory = new JButton("Output To...");
		jbtnEncryptionOutputDirectory.setToolTipText("Specifies the location to output the images with the embedded stego content");
		jbtnEncryptionOutputDirectory.setForeground(Color.BLACK);
		jbtnEncryptionOutputDirectory.setFont(new Font("Tahoma", Font.PLAIN, 11));
		jbtnEncryptionOutputDirectory.setBackground(Color.WHITE);
		jbtnEncryptionOutputDirectory.setBounds(34, 24, 105, 23);
		jbtnEncryptionOutputDirectory.addActionListener(this);
		panel_7.add(jbtnEncryptionOutputDirectory);
		
		jlblEncryptionOutputDirectory = new JLabel("Specify Output Location...");
		jlblEncryptionOutputDirectory.setToolTipText("Specify Output Location");
		jlblEncryptionOutputDirectory.setBounds(165, 28, 706, 14);
		panel_7.add(jlblEncryptionOutputDirectory);
		
		JPanel panel_8 = new JPanel();
		panel_8.setBorder(new TitledBorder(null, "Encryption Action", TitledBorder.LEADING, TitledBorder.TOP, null, null));
		panel_8.setLayout(null);
		panel_8.setBounds(228, 8, 212, 63);
		jpnlEncryption.add(panel_8);
		
		cbEncryptionAction_Encrypt = new Checkbox("Encrypt", cbgEncryptionAction, true);
		cbEncryptionAction_Encrypt.setEnabled(false);
		cbEncryptionAction_Encrypt.setFont(new Font("Dialog", Font.PLAIN, 20));
		cbEncryptionAction_Encrypt.setBounds(10, 24, 90, 22);
		cbEncryptionAction_Encrypt.addItemListener(this);
		panel_8.add(cbEncryptionAction_Encrypt);
		
		cbEncryptionAction_Decrypt = new Checkbox("Decrypt", cbgEncryptionAction, false);
		cbEncryptionAction_Decrypt.setEnabled(false);
		cbEncryptionAction_Decrypt.setFont(new Font("Dialog", Font.PLAIN, 20));
		cbEncryptionAction_Decrypt.setBounds(108, 24, 94, 22);
		cbEncryptionAction_Decrypt.addItemListener(this);
		panel_8.add(cbEncryptionAction_Decrypt);
		jbtnGenerateKeys.addActionListener(this);
		this.cbEncryption_Disabled.addItemListener(this);
		this.cbEncryption_Enabled.addItemListener(this);
		tabbedPane.addTab("Carrier Image", this.jpnlCarrierImage);
		tabbedPane.addTab("Upload / Download", this.jpnlUploadDestination);
		tabbedPane.addTab("JAR Interaction Content", this.jpnlDownloadContent);
		jpnlDownloadContent.setLayout(null);
		
		jpnlCookieJAR = new JPanel(new GridLayout(7,1));
		tabbedPane.addTab("Cookie JAR", this.jpnlCookieJAR);
		
		JPanel jpnlEmbedBorderPanel = new JPanel();
		jpnlEmbedBorderPanel.setBorder(new TitledBorder(null, "Embed JAR(s)", TitledBorder.LEADING, TitledBorder.TOP, null, null));
		embed_CookieJAR = new JPanel_AddCarrierImagePath_OR_UploadDestination(this, 2, null, null, null, null);
		
		jpnlEmbedBorderPanel.add(embed_CookieJAR);
		jpnlEmbedBorderPanel.setLayout(null);
		embed_CookieJAR.setBounds(10,  13, 900, 28);
		
		jpnlCookieJAR.add(jpnlEmbedBorderPanel);
		
		JPanel jpnlExtractBorderPanel = new JPanel();
		jpnlExtractBorderPanel.setBorder(new TitledBorder(null, "Extract JAR(s)", TitledBorder.LEADING, TitledBorder.TOP, null, null));
		extract_CookieJAR = new JPanel_AddCarrierImagePath_OR_UploadDestination(this, 2, null, null, null, null);
		jpnlExtractBorderPanel.add(extract_CookieJAR);
		jpnlExtractBorderPanel.setLayout(null);
		extract_CookieJAR.setBounds(10,  13, 900, 28);
		jpnlCookieJAR.add(jpnlExtractBorderPanel);
		
		JPanel jpnlEncryptBorderPanel = new JPanel();
		jpnlEncryptBorderPanel.setBorder(new TitledBorder(null, "Encrypt JAR(s)", TitledBorder.LEADING, TitledBorder.TOP, null, null));
		
		encrypt_CookieJAR = new JPanel_AddCarrierImagePath_OR_UploadDestination(this, 2, null, null, null, null);
		jpnlEncryptBorderPanel.add(encrypt_CookieJAR);
		jpnlEncryptBorderPanel.setLayout(null);
		encrypt_CookieJAR.setBounds(10,  13, 900, 28);
		jpnlCookieJAR.add(jpnlEncryptBorderPanel);
		
		JPanel jpnlDecryptBorderPanel = new JPanel();
		jpnlDecryptBorderPanel.setBorder(new TitledBorder(null, "Decrypt JAR(s)", TitledBorder.LEADING, TitledBorder.TOP, null, null));
		
		decrypt_CookieJAR = new JPanel_AddCarrierImagePath_OR_UploadDestination(this, 2, null, null, null, null);
		jpnlDecryptBorderPanel.add(decrypt_CookieJAR);
		jpnlDecryptBorderPanel.setLayout(null);
		decrypt_CookieJAR.setBounds(10,  13, 900, 28);
		
		jpnlCookieJAR.add(jpnlDecryptBorderPanel);
		
		JPanel jpnlUploadBorderPanel = new JPanel();
		jpnlUploadBorderPanel.setBorder(new TitledBorder(null, "Upload JAR(s)", TitledBorder.LEADING, TitledBorder.TOP, null, null));
		
		upload_CookieJAR = new JPanel_AddCarrierImagePath_OR_UploadDestination(this, 2, null, null, null, null);
		jpnlUploadBorderPanel.add(upload_CookieJAR);
		jpnlUploadBorderPanel.setLayout(null);
		upload_CookieJAR.setBounds(10,  13, 900, 28);
		
		jpnlCookieJAR.add(jpnlUploadBorderPanel);
		
		JPanel jpnlDownloadBorderPanel = new JPanel();
		jpnlDownloadBorderPanel.setBorder(new TitledBorder(null, "Download JAR(s)", TitledBorder.LEADING, TitledBorder.TOP, null, null));
		
		download_CookieJAR = new JPanel_AddCarrierImagePath_OR_UploadDestination(this, 2, null, null, null, null);
		jpnlDownloadBorderPanel.add(download_CookieJAR);
		jpnlDownloadBorderPanel.setLayout(null);
		download_CookieJAR.setBounds(10,  13, 900, 28);
		
		jpnlCookieJAR.add(jpnlDownloadBorderPanel);
		
		JPanel jpnlReComposeBorderPanel = new JPanel();
		jpnlReComposeBorderPanel.setBorder(new TitledBorder(null, "ReCompose JAR(s)", TitledBorder.LEADING, TitledBorder.TOP, null, null));
		
		recompose_CookieJAR = new JPanel_AddCarrierImagePath_OR_UploadDestination(this, 2, null, null, null, null);
		jpnlReComposeBorderPanel.add(recompose_CookieJAR);
		jpnlReComposeBorderPanel.setLayout(null);
		recompose_CookieJAR.setBounds(10,  13, 900, 28);
		
		jpnlCookieJAR.add(jpnlReComposeBorderPanel);
		
		
		JLabel jlblPathToLoadedJAR_File_DownloadContent_Text = new JLabel("  Path to Selected JAR File: ");
		jlblPathToLoadedJAR_File_DownloadContent_Text.setBounds(10, 3, 139, 14);
		jpnlDownloadContent.add(jlblPathToLoadedJAR_File_DownloadContent_Text);
		
		jlblPathToLoadedJAR_File_DownloadContent = new JLabel("Not Specified");
		jlblPathToLoadedJAR_File_DownloadContent.setBounds(155, 3, 554, 14);
		jpnlDownloadContent.add(jlblPathToLoadedJAR_File_DownloadContent);
		
		jtxtpneInteractionContent = new JTextPane();
		jtxtpneInteractionContent.setEditable(false);
		jtxtpneInteractionContent.setBounds(782, 135, 126, 146);
		
		lblPathToDownload_Text = new JLabel("Path to Download Content:");
		lblPathToDownload_Text.setBounds(16, 28, 139, 14);
		jpnlDownloadContent.add(lblPathToDownload_Text);
		
		jlblPathToDownloadContent = new JLabel("Path to Download Content");
		jlblPathToDownloadContent.setBounds(155, 28, 554, 14);
		jpnlDownloadContent.add(jlblPathToDownloadContent);
		
		jscrlpne_TxtPneDownloadContent = new JScrollPane();
		jscrlpne_TxtPneDownloadContent.setBounds(10, 45, 896, 239);
		jscrlpne_TxtPneDownloadContent.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
		jscrlpne_TxtPneDownloadContent.setViewportView(jtxtpneInteractionContent);
		jpnlDownloadContent.add(jscrlpne_TxtPneDownloadContent);
		
		jcbJAR_ToSendCommands = new JComboBox();
		jcbJAR_ToSendCommands.setEnabled(false);
		jcbJAR_ToSendCommands.setModel(new DefaultComboBoxModel(new String[] {"No Active JAR Loaded"}));
		jcbJAR_ToSendCommands.setBounds(715, 8, 196, 23);
		jpnlDownloadContent.add(jcbJAR_ToSendCommands);
		
		jtfCommands = new JTextField();
		jtfCommands.setEnabled(false);
		jtfCommands.setToolTipText("Enter Commands to send to the selected JAR File");
		jtfCommands.setBounds(10, 292, 749, 20);
		jpnlDownloadContent.add(jtfCommands);
		jtfCommands.setColumns(10);
		
		JButton jbtnSendCommands_JAR_Interaction = new JButton("Send");
		jbtnSendCommands_JAR_Interaction.setEnabled(false);
		jbtnSendCommands_JAR_Interaction.setToolTipText("Sends the entered command(s) to the selected JAR File");
		jbtnSendCommands_JAR_Interaction.setBounds(769, 291, 139, 23);
		jpnlDownloadContent.add(jbtnSendCommands_JAR_Interaction);
		
		JLabel lblPathToEncryptionJAR_Text = new JLabel("  Path to Encryption JAR:");
		lblPathToEncryptionJAR_Text.setBounds(10, 16, 139, 14);
		jpnlDownloadContent.add(lblPathToEncryptionJAR_Text);
		
		jlblPathToEncryption_JAR = new JLabel("Encryption Not Enabled");
		jlblPathToEncryption_JAR.setBounds(155, 16, 554, 14);
		jpnlDownloadContent.add(jlblPathToEncryption_JAR);
		
		JLabel jlblBrowse_UploadDestination = new JLabel("Browse", SwingConstants.CENTER);
		jlblBrowse_UploadDestination.setBounds(50, 21, 62, 20);
		jpnlUploadDestination.add(jlblBrowse_UploadDestination);
		
		jlblTab = new JLabel("Tag", SwingConstants.CENTER);
		jlblTab.setBounds(473, 21, 69, 20);
		jpnlUploadDestination.add(jlblTab);
		
		jlblPathToSelectedJAR_Text_UploadDestination = new JLabel(" Path to Selected JAR File:");
		jlblPathToSelectedJAR_Text_UploadDestination.setBounds(10, 298, 139, 14);
		jpnlUploadDestination.add(jlblPathToSelectedJAR_Text_UploadDestination);
		
		jlblPathToSelectedJAR_UploadDestination = new JLabel("Not Specified");
		jlblPathToSelectedJAR_UploadDestination.setBounds(145, 298, 747, 14);
		jpnlUploadDestination.add(jlblPathToSelectedJAR_UploadDestination);
		
		jlblAppendIndex = new JLabel("Append Index", SwingConstants.CENTER);
		jlblAppendIndex.setToolTipText("Specifies if user wishes to append the image's index to the Tag when uploading to user's specified account");
		jlblAppendIndex.setBounds(716, 21, 80, 20);
		jpnlUploadDestination.add(jlblAppendIndex);
		contentPane.add(tabbedPane);
		
		jbtnGo = new JButton("GO!");
		jbtnGo.setToolTipText("Embed the information within the carrier image(s)");
		jbtnGo.setForeground(Color.BLACK);
		jbtnGo.setFont(new Font("Segoe UI", Font.BOLD, 16));
		jbtnGo.setBackground(SystemColor.activeCaption);
		jbtnGo.addActionListener(this);
		jbtnGo.setBounds(153, 347, 927, 23);
		contentPane.add(jbtnGo);
		
		int colorVal = Integer.parseInt( "ffffff",16);
		Color clr = new Color(colorVal);
		
		JFrame f = new JFrame();
		JPanel jpnlCntPne = new JPanel(new GridLayout(6,1, 5,5));
		f.setContentPane(jpnlCntPne);
		f.setBounds(100, 100, 500, 500);
		f.setTitle("SNSCat Color Test");
		
		String color_1 = "77777f", color_2 = "77777e", color_3 = "77777d", color_4 = "77777c", color_5 = "77777b", color_6 = "555555";
		JLabel jlbl_1 = new JLabel(color_1, JLabel.CENTER); jlbl_1.setOpaque(true); jlbl_1.setBackground(new Color(Integer.parseInt(color_1, 16))); jpnlCntPne.add(jlbl_1);
		JLabel jlbl_2 = new JLabel(color_2, JLabel.CENTER); jlbl_2.setOpaque(true); jlbl_2.setBackground(new Color(Integer.parseInt(color_2, 16))); jpnlCntPne.add(jlbl_2);
		JLabel jlbl_3 = new JLabel(color_3, JLabel.CENTER); jlbl_3.setOpaque(true); jlbl_3.setBackground(new Color(Integer.parseInt(color_3, 16))); jpnlCntPne.add(jlbl_3);
		JLabel jlbl_4 = new JLabel(color_4, JLabel.CENTER); jlbl_4.setOpaque(true); jlbl_4.setBackground(new Color(Integer.parseInt(color_4, 16))); jpnlCntPne.add(jlbl_4);
		JLabel jlbl_5 = new JLabel(color_5, JLabel.CENTER); jlbl_5.setOpaque(true); jlbl_5.setBackground(new Color(Integer.parseInt(color_5, 16))); jpnlCntPne.add(jlbl_5);
		JLabel jlbl_6 = new JLabel(color_6, JLabel.CENTER); jlbl_6.setOpaque(true); jlbl_6.setBackground(new Color(Integer.parseInt(color_6, 16))); jpnlCntPne.add(jlbl_6);
		
addCarrierImagePath();
		
		
addUploadDestinationAccountInfo();
		this.jbtnNewButton.addActionListener(this);
		
		
		ThreadProgress progressBarThread = new ThreadProgress();
		
		
		enableExternalSelectionOf_JAR_Files(algorithm_ImportExternal_JAR);
	}
	
	public void itemStateChanged(ItemEvent ie)
	{
		try
		{
			if(ie.getSource() == this.cbEncryption_Disabled)
			{				
				encryptSourceData = !cbEncryption_Disabled.getState();
				Drivers.sop("Encryption: " + encryptSourceData);
				
				cbInternalAlg_Encryption.setEnabled(false);
				cbExternalAlg_Encryption.setEnabled(false);
				
				cbEncryptionAction_Encrypt.setEnabled(false);
				cbEncryptionAction_Decrypt.setEnabled(false);
				
				jbtnImportKeys.setEnabled(false);
				
				jlblPathToEncryption_JAR.setText("Encryption Not Enabled");
			}
			
			else if(ie.getSource() == this.cbEncryption_Enabled)
			{
				encryptSourceData = cbEncryption_Enabled.getState();
				Drivers.sop("Encryption: " + encryptSourceData);
				
				cbInternalAlg_Encryption.setEnabled(true);
				cbExternalAlg_Encryption.setEnabled(true);
				
				cbEncryptionAction_Encrypt.setEnabled(true);
				cbEncryptionAction_Decrypt.setEnabled(true);
				
				jbtnImportKeys.setEnabled(true);
				
				
				jlblPathToEncryption_JAR.setText("Select Encryption Top Folder");
			}
			
			else if(ie.getSource() == cbEmbedContent)
			{
				loadEmbedContent = true;
				loadExtractContent = false;
				this.loadUploadContent = false;
				loadRecomposeSourceFiles = false;
				loadDownloadContent = false;
				loadEncryption = false;
				loadCookieJAR = false;
				
				jlblEmbed_Extract_Status.setText("Embed");
				jbtnGo.setText("Embed");
				jlblEmbed_Extract_Status.setToolTipText("Indicates this program is setup to embed content into the carrier image");
				
				jbtnGo.setToolTipText("Launch program to embed content into specified carrier image(s)");
			}
			else if(ie.getSource() == cbExtractContent)
			{
				loadExtractContent = true;
				loadEmbedContent = false;
				this.loadUploadContent = false;
				loadRecomposeSourceFiles = false;
				loadDownloadContent = false;
				loadEncryption = false;
				loadCookieJAR = false;
				
				jlblEmbed_Extract_Status.setText("Extract");
				jbtnGo.setText("Extract");
				jlblEmbed_Extract_Status.setToolTipText("Indicates this program is setup to extract content from the carrier image");
				
				jbtnGo.setToolTipText("Launch program to extract content from specified carrier image(s)");
			}
			
			else if(ie.getSource() == cbUploadContent)
			{
				loadUploadContent = true;
				loadExtractContent = false;
				loadEmbedContent = false;
				loadRecomposeSourceFiles = false;
				loadDownloadContent = false;
				loadEncryption = false;
				loadCookieJAR = false;
				
				jlblEmbed_Extract_Status.setText("Upload");
				jbtnGo.setText("Upload");
				jlblEmbed_Extract_Status.setToolTipText("Indicates this program is setup to upload carrier image(s) to specified account locations");
				
				jbtnGo.setToolTipText("Launch program to upload content to specified account locations");
				
				
				this.tabbedPane.setTitleAt(Drivers.UPLOAD_DOWNLOAD_CONTENT_TAB_PANE_INDEX, "Upload Content");
				jlblUploadCarrier.setText("<html> <b><u>Upload Content</b></u></html>");
				
				this.reconfigureGUI_InstanceNodes();
			}
			
			else if(ie.getSource() == cbDownloadContent)
			{
				loadUploadContent = false;
				loadExtractContent = false;
				loadEmbedContent = false;
				loadRecomposeSourceFiles = false;
				loadDownloadContent = true;
				loadEncryption = false;
				loadCookieJAR = false;
				
				
				jlblEmbed_Extract_Status.setText("Download");
				jbtnGo.setText("Download");
				jlblEmbed_Extract_Status.setToolTipText("Indicates this program is setup to download carrier files from the specivied social networking site");
				
				jbtnGo.setToolTipText("Launch program to download content from selected social networkwing site");
				
			
				this.tabbedPane.setTitleAt(Drivers.UPLOAD_DOWNLOAD_CONTENT_TAB_PANE_INDEX, "Download Content");
				jlblUploadCarrier.setText("<html> <b><u>Download Content</b></u></html>");
				
				this.reconfigureGUI_InstanceNodes();
			}
			
			else if(ie.getSource() == cbReComposeSourceFile)
			{
				loadUploadContent = false;
				loadExtractContent = false;
				loadEmbedContent = false;
				loadRecomposeSourceFiles = true;
				loadDownloadContent = false;
				loadEncryption = false;
				loadCookieJAR = false;
				
				
				jlblEmbed_Extract_Status.setText("ReCompose");
				jbtnGo.setText("ReCompose");
				jlblEmbed_Extract_Status.setToolTipText("Indicates this program is setup to re-compose source data from specified carrier images");
				
				jbtnGo.setToolTipText("Launch program to Re-Compose source content from selected carrier images");
			}
			
			else if(ie.getSource() == this.cbEncryption)
			{
				loadUploadContent = false;
				loadExtractContent = false;
				loadEmbedContent = false;
				loadRecomposeSourceFiles = false;
				loadDownloadContent = false;
				loadEncryption = true;
				loadCookieJAR = false;
				
				
				jlblEmbed_Extract_Status.setText("Encryption");
				jbtnGo.setText("Encryption");
				jlblEmbed_Extract_Status.setToolTipText("Indicates this program is setup to Encrypt / Decrypt source data from specified carrier images");
				
				jbtnGo.setToolTipText("Launch program to Encrypt / Decrypt source content from selected carrier images");
			}
			
			else if(ie.getSource() == cbCookieJAR)
			{
				loadUploadContent = false;
				loadExtractContent = false;
				loadEmbedContent = false;
				loadRecomposeSourceFiles = false;
				loadDownloadContent = false;
				loadEncryption = false;
				loadCookieJAR = true;
				
				
				jlblEmbed_Extract_Status.setText("Cookie JAR");
				jbtnGo.setText("Cookie JAR  - Package New JAR Files");
				jlblEmbed_Extract_Status.setToolTipText("Indicates this program is set up to package selected files into a new JAR file");
				
				jbtnGo.setToolTipText("Launch program to set up to package selected files into a new JAR file");
				
			}
			
			else if(ie.getSource() == cbDefaultInternalAlgorithm)
			{
				StegoFileSelection.algorithm_LoadInternalAlg = true;
				StegoFileSelection.algorithm_ImportExternal_JAR = false;
				
				enableExternalSelectionOf_JAR_Files(algorithm_ImportExternal_JAR);
				
				Drivers.sop("Loading Default Stego Embed/Extract Alg");
			}
			
			
			else if(ie.getSource() ==  cbImportExternalJar)
			{
				StegoFileSelection.algorithm_ImportExternal_JAR = true;
				StegoFileSelection.algorithm_LoadInternalAlg = false;
				
				enableExternalSelectionOf_JAR_Files(algorithm_ImportExternal_JAR);			
				
				Drivers.sop("Loading External Stego Embed/Extract Alg");
			}
			
			else if(ie.getSource() == cbUseNative_API)
			{
				StegoFileSelection.jar_UseNative_API = true;
				StegoFileSelection.jar_EnterExternalCommands = false;
				StegoFileSelection.jar_UseCustomeInstructions = false;
				
				Drivers.sop("jar_UseNative_API: " + jar_UseNative_API);
			}
			else if(ie.getSource() == cbUseCustomInstructions)
			{
				StegoFileSelection.jar_UseNative_API = false;
				StegoFileSelection.jar_EnterExternalCommands = false;
				StegoFileSelection.jar_UseCustomeInstructions = true;
				
				Drivers.sop("jar_UseCstomeInstructions: " + jar_UseCustomeInstructions);
			}
			else if(ie.getSource() == cbEnterExternalCommand)
			{
				StegoFileSelection.jar_UseNative_API = false;
				StegoFileSelection.jar_EnterExternalCommands = true;
				StegoFileSelection.jar_UseCustomeInstructions = false;
				
				Drivers.sop("jar_EnterExternalCommands: " + jar_EnterExternalCommands);
			}
			
			else if(ie.getSource() == cbInternalAlg_Encryption)
			{
				this.encryptionAlgorithm_ImportExternal_JAR = false;
				this.encryptionAlgorithm_LoadInternalAlg = true;
				
				Drivers.sop("Load Internal Encryption JAR: " + encryptionAlgorithm_LoadInternalAlg);
				
				enableEncryptionWidgets(false);
			}
			
			else if(ie.getSource() == cbExternalAlg_Encryption)
			{
				cbExternalAlg_Encryption.setBackground(Drivers.clrBackground);
				
				this.encryptionAlgorithm_ImportExternal_JAR = true;
				this.encryptionAlgorithm_LoadInternalAlg = false;
				
				Drivers.sop("Load External Encryption JAR: " + encryptionAlgorithm_ImportExternal_JAR);
				
				enableEncryptionWidgets(true);
			}
			
			else if(ie.getSource() == cbEncryptionAction_Encrypt)
			{
				encryptionAction_Encrypt = true;
				encryptionAction_Decrypt = false;
				
				Drivers.sop("Encryption Action Set to Encrypt File: " + encryptionAction_Encrypt);
			}
			
			else if(ie.getSource() == cbEncryptionAction_Decrypt)
			{
				encryptionAction_Encrypt = false;
				encryptionAction_Decrypt = true;
				
				Drivers.sop("Encryption Action Set to Decrypt File: " + encryptionAction_Decrypt);
			}
			
		}
		catch(Exception e)
		{
			Drivers.eop("itemStateChanged", strMyClassName, e, e.getLocalizedMessage(), true);
		}
	}
	
	public boolean enableEncryptionWidgets(boolean state)
	{
		try
		{
			jbtnSelectTopFolder_Encryption.setEnabled(state);
			jcbSelect_JAR_Encryption.setEnabled(state);
			jtfEncryptionKeySize.setEnabled(state);
			//jbtnGenerateKeys.setEnabled(state);
			
			return true;
		}
		catch(Exception e)
		{
			Drivers.eop("enableEncryptionWidgets", strMyClassName, e, e.getLocalizedMessage(), true);
		}
		
		return false;
	}
	
	public boolean reconfigureGUI_InstanceNodes()
	{
		try
		{
			if(this.loadDownloadContent)
			{
				//Remove all, add 1
				alUploadDownload_DestinationPanels.clear();				
				this.addUploadDestinationAccountInfo();
				
				return true;
			}
			
			else if(this.loadUploadContent)
			{
				
				alUploadDownload_DestinationPanels.clear();				
				this.addUploadDestinationAccountInfo();				
				
			}
			
			return true;
		}
		catch(Exception e)
		{
			Drivers.eop("reconfigureGUI_InstanceNodes", strMyClassName, e, e.getLocalizedMessage(), true);
		}
		
		return false;
	}
	
	public void enableExternalSelectionOf_JAR_Files(boolean status)
	{
		this.jpnlExternalJAR.setEnabled(status);
		jcbExternal_JAR.setEnabled(status);
		this.jbtnSelectTopFolder.setEnabled(status);
		
		this.cbUseCustomInstructions.setEnabled(status);
		this.cbUseNative_API.setEnabled(status);
		this.cbEnterExternalCommand.setEnabled(status);
	}
	
	public void actionPerformed(ActionEvent ae)
	{
		try
		{
			if(ae.getSource() == this.jbtnAddUploadCarrierAccount)
			{
				addUploadDestinationAccountInfo();
			}
			
			else if(ae.getSource() == jbtnAddCarrierImagePath)
			{
				addCarrierImagePath();
			}
			
			else if(ae.getSource() == this.jbtnAddSourceFile)
			{
				ae_jbtnAddSourceFile();				
			}
			
			else if(ae.getSource() == this.jbtnEnterSourceText)
			{
				this.enableSourceTextInsertion();
			}
			
			else if(ae.getSource() == jbtnAddDirectory)
			{
				ae_jbtnAddDirectory();
			}
			
			else if(ae.getSource() == this.jbtnAddFrom_CSV)
			{
				ae_addAccounts_CSV();
			}
			
			else if(ae.getSource() == jbtnSaveTo_CSV)
			{
				ae_jbtnSaveTo_CSV();
			}
			
			else if(ae.getSource() == jbtnEmbedContent)
			{
				ae_jbtnEmbedContent();
			}
			
			else if(ae.getSource() == jbtnOutputTo)
			{
				ae_jbtnOutputTo();
			}
			
			else if(ae.getSource() == jbtnExtractContent)
			{
				ae_jbtnExtractContent();
			}
			
			else if(ae.getSource() == jbtnGenerateKeys)
			{
				generateEncryptionKeys();
			}
			
			else if(ae.getSource() == jbtnGo)
			{
				ae_jbtnGo();
			}
			
			else if(ae.getSource() == jbtnSelectTopFolder)
			{
				ae_jbtnSelectTopFolder();
			}
			
			else if(ae.getSource() == jbtnUploadContent)
			{
				ae_jbtnUploadContent();
			}
			
			else if(ae.getSource() == jbtnReComposeSourceFile)
			{
				ae_jbtnReComposeSourceFile();
			}
			
			else if(ae.getSource() == jbtnDownloadContent)
			{
				ae_jbtnDownloadContent();
			}
			
			else if(ae.getSource() == jbtnEncryption)
			{
				ae_jbtnEncryption();
			}
			
			else if(ae.getSource() == this.jbtnSelectTopFolder_Encryption)
			{
				this.jbtnSelectTopFolder_Encryption.setBackground(Drivers.clrBackground);
				
				ae_jbtnSelectTopFolder_Encryption();
			}
			
			else if(ae.getSource() == jbtnEncryptionOutputDirectory)
			{
				ae_jbtnEncryptionOutputDirectory();
			}
			
			else if(ae.getSource() == jbtnImportKeys)
			{
				ae_jbtnImportKeys();
			}
			
			else if(ae.getSource() == jbtnClearSourceText)
			{
				StegoFileSelection.setSourceText(null, "");
			}
			
			else if(ae.getSource() == jbtnSaveSourceTextToDisk)
			{
				ae_jbtnSaveSourceTextToDisk();
			}
			
			else if(ae.getSource() == jbtnCookieJAR)
			{
				ae_jbtnCookieJAR();
			}
			
			else if(ae.getSource() == jbtnOpenFileLocation)
			{
				//Open the Folder!
				Drivers.launchFolder(this.fleCarrierImageSaveDirectory);
			}
			
		}
		
		catch(Exception e)
		{
			Drivers.eop("actionPerformed", this.strMyClassName, e, e.getMessage(), true);
		}
				
	}
	
	
	
	public boolean ae_jbtnCookieJAR()
	{
		try
		{
			if(!this.verifyOutputDirectory())
			{
				Drivers.jop_Error("Please refer to highlighted section.\nYou must select an output directory to save new Packaged JAR", "Output Directory Not Specified");
				return false;
			}
			
			Caller_CookieJAR implantCreation = new Caller_CookieJAR(this.fleCarrierImageSaveDirectory, this.embed_CookieJAR.getSelectedFiles_CookieJAR(new String[]{"JAR"}), extract_CookieJAR.getSelectedFiles_CookieJAR(new String[]{"JAR"}), encrypt_CookieJAR.getSelectedFiles_CookieJAR(new String[]{"JAR"}), decrypt_CookieJAR.getSelectedFiles_CookieJAR(new String[]{"JAR"}), upload_CookieJAR.getSelectedFiles_CookieJAR(new String[]{"JAR"}), download_CookieJAR.getSelectedFiles_CookieJAR(new String[]{"JAR"}), recompose_CookieJAR.getSelectedFiles_CookieJAR(new String[]{"JAR"}));
			
			return true;		
		}
		catch(Exception e)
		{
			Drivers.eop("ae_jbtnCookieJAR", strMyClassName, e, e.getLocalizedMessage(), true);
		}
		
		return false;
	}
	
	public boolean ae_jbtnImportKeys()
	{
		try
		{

			this.fleGeneratedEncryptionKey = Drivers.querySelectFile(true, "Please specify location of the encryption key file", JFileChooser.FILES_ONLY, false, false);
			
			if(fleGeneratedEncryptionKey != null && fleGeneratedEncryptionKey.exists())
			{
				this.jtfEncryptionKeyPath.setText(fleGeneratedEncryptionKey.getCanonicalPath());
				this.jtfEncryptionKeyPath.setToolTipText(fleGeneratedEncryptionKey.getAbsolutePath());
			}
			
			else
			{
				this.jtfEncryptionKeyPath.setText("");
				this.jtfEncryptionKeyPath.setToolTipText("No File Selected to import");
			}
			
			return true;
		}
		catch(Exception e)
		{
			Drivers.eop("ae_jbtnImportKeys", strMyClassName, e, e.getLocalizedMessage(), true);
		}
		
		return false;
	}
	
	public boolean ae_jbtnEncryptionOutputDirectory()
	{
		try
		{
			fleEncryptionOutputDirectory = Drivers.querySelectFile(false, "Please Select the Directory to save the encrypted files when complete", JFileChooser.DIRECTORIES_ONLY, false, false);
						
			if(fleEncryptionOutputDirectory != null && fleEncryptionOutputDirectory.isDirectory() && fleEncryptionOutputDirectory.exists())
			{
				this.jlblEncryptionOutputDirectory.setText(fleEncryptionOutputDirectory.getCanonicalPath());
				this.jlblEncryptionOutputDirectory.setToolTipText(fleEncryptionOutputDirectory.getCanonicalPath());
				
				this.jbtnEncryptionOutputDirectory.setBackground(Drivers.clrBackground);
			}
			else
			{
				this.jlblEncryptionOutputDirectory.setText("No Directory Path Specified");
				this.jlblEncryptionOutputDirectory.setToolTipText("No Directory Path Specified");
			}
			
			return true;
		}
		catch(Exception e)
		{
			Drivers.eop("ae_jbtnEncryptionOutputDirectory", strMyClassName, e, e.getLocalizedMessage(), true);
		}
		
		return false;
	}
	
	public boolean ae_jbtnSelectTopFolder_Encryption()
	{
		try
		{
			StegoFileSelection.fleTopFolder_Encryption_ToExternal_JAR = Drivers.querySelectFile(true, "Please Select the Top Folder containing the external JAR Files for Encryption", JFileChooser.DIRECTORIES_ONLY, false, false);
			
			if(StegoFileSelection.fleTopFolder_Encryption_ToExternal_JAR == null)
			{
				Drivers.sop("No File Was Selected. Mmm mmm not here!");
			}
			
			else
			{
				jcbSelect_JAR_Encryption.removeAllItems();
				
				jbtnSelectTopFolder_Encryption.setToolTipText("Path to Top Folder: " + fleTopFolder_Encryption_ToExternal_JAR.getCanonicalPath());
				this.jcbSelect_JAR_Encryption.setToolTipText("Path to Top Folder: " + fleTopFolder_Encryption_ToExternal_JAR.getCanonicalPath());
				
				alEncryptionPath_To_JAR_Files = Drivers.getFilesUnderSelectedDirectory(fleTopFolder_Encryption_ToExternal_JAR, new String[]{"JAR"});
				
				if(alEncryptionPath_To_JAR_Files != null && alEncryptionPath_To_JAR_Files.size() > 0)
				{									
					
					String strFleName = "";
					
					for(int i = 0; i < alEncryptionPath_To_JAR_Files.size(); i++)
					{
						strFleName = alEncryptionPath_To_JAR_Files.get(i).getCanonicalPath();
						jcbSelect_JAR_Encryption.addItem(strFleName.substring(strFleName.lastIndexOf("\\") + 1) + "   --> [" + strFleName + "]");						
					}
					
					jbtnGenerateKeys.setEnabled(true);
					
				}
				
				else if(alEncryptionPath_To_JAR_Files == null || alEncryptionPath_To_JAR_Files.size() < 1)
				{
					jcbSelect_JAR_Encryption.addItem(Drivers.strJarFileNotFound);
					jbtnGenerateKeys.setEnabled(false);
					
				}
				
				
			}
			
			return true;
		}
		catch(Exception e)
		{
			Drivers.eop("ae_jbtnSelectTopFolder_Encryption", strMyClassName, e, e.getLocalizedMessage(), true);
		}
		
		return false;
	}
	
	public boolean verifyEncryption()
	{
		try
		{
			if(!encryptSourceData)
			{
				
				return true;
			}
			if(this.loadEncryption && !verifySourceFile())
			{
				Drivers.jop_Error("You must select a Source File to Encrypt / Decrypt under the \"Source Data\" Tab", "Source File Not Selected");
				return false;
			}
			
			if(this.loadEncryption && !encryptSourceData)
			{
				Drivers.jop_Error("You must enable Encryption State from the Encryption tab", "Encryption State not Enabled");
				return false;
			}
			
			if(!encryptionAlgorithm_ImportExternal_JAR)
			{
				cbExternalAlg_Encryption.setBackground(Color.yellow);
				Drivers.jop_Error("No internal support for encryption is enabled at this time. \nPlease select import an external JAR from the Encryption Tab to handle encryption capabilities.\nSelect Top Folder to load for encryption if applicable", "Import External JAR for Encryption");				
				return false;
			}
			
			
			if(this.alEncryptionPath_To_JAR_Files == null || this.alEncryptionPath_To_JAR_Files.size() < 1 || this.jcbSelect_JAR_Encryption.getSelectedItem() == null || this.jcbSelect_JAR_Encryption.getSelectedItem().toString().trim().equals("") || this.jcbSelect_JAR_Encryption.getSelectedItem().toString().trim().equalsIgnoreCase(Drivers.strJarFileNotFound))
			{
				this.jbtnSelectTopFolder_Encryption.setBackground(Color.red);
				
				Drivers.jop_Error("You must select load a top folder and import an Encryption JAR file to in order to use this feature", "External Encryption JAR File Not Selected");
				
				return false;
			}
			
						
			fleEncryptionJAR = this.alEncryptionPath_To_JAR_Files.get(this.jcbSelect_JAR_Encryption.getSelectedIndex());//the file in the arraylist corresponds to the selected
				
			Drivers.sop("Path to Encryption JAR to use: " + fleEncryptionJAR.getCanonicalPath());
			Drivers.sop("User is entering in external command");
				
			jlblPathToEncryption_JAR.setText(fleEncryptionJAR.getCanonicalPath());		
			
			
			
			if(!verifyEncryptionFolderPath())
			{
				return false;
			}
			
			
			if(this.loadEncryption && !verifyEncryptionOutputDirectory())
			{
				Drivers.jop_Error("You must specify an output directory to save the enrypted file", "Encryption Output Directory Not Specified");				
				return false;
			}
			
			
			if(this.fleGeneratedEncryptionKey == null || !fleGeneratedEncryptionKey.exists() || !fleGeneratedEncryptionKey.isFile())
			{
				Drivers.jop_Error("Unable to Find path to encryption key. \nPlease Generate an Encryption Key", "Encryption Key Error");
				
				this.fleGeneratedEncryptionKey = Drivers.querySelectFile(true, "Please enter location of the encryption key file", JFileChooser.FILES_ONLY, false, false);
											
				return false;
			}
									
			Drivers.sop("\tVerification of Encryption complete - No Errors Detected");
			return true;
			
			
		}
		
		catch(Exception e)
		{
			Drivers.eop("verifyEncryption", strMyClassName, e, e.getLocalizedMessage(), true);
		}
		
		return false;
	}
	
	public boolean verifyEncryptionOutputDirectory()
	{
		try
		{
			if(this.fleEncryptionOutputDirectory != null)
			{
				this.jbtnEncryptionOutputDirectory.setBackground(Drivers.clrBackground);
				
				jlblEncryptionOutputDirectory.setText(fleEncryptionOutputDirectory.getCanonicalPath());
				
				Drivers.sop("\tVerification of Output Encryption Save Directory Complete - No Errors detected");
				return true;
			}
			else
			{
				
				
				this.jbtnEncryptionOutputDirectory.setBackground(Color.red);
				Drivers.sop("\t\tVerification of Output Encryption Save Directory Complete - * * * ERRORS DETECTED * * * - No Output Encryption Directory Selected");
				return false;
			}
		}
		catch(Exception e)
		{
			Drivers.eop("verifyEncryptionOutputDirectory", strMyClassName, e, e.getLocalizedMessage(), true);
		}
		
		return false;
	}
	
	public boolean ae_jbtnEncryption()
	{
		try
		{
			
			
			if(!this.verifyEncryption())
			{
				Drivers.sop("\tVerification of Encryption complete - * * * ERRORS DETECTED * * * ");
				return false;
			}
			
			if(this.encryptionAction_Encrypt)
			{
				call_Caller_Encryption_XOR_Encrypt();
				
			}
			else if(this.encryptionAction_Decrypt)
			{
				this.call_Caller_Encryption_XOR_Decryption();
			}
			
			
			
			
			return true;
		}
		catch(Exception e)
		{
			Drivers.eop("ae_jbtnEncryption", strMyClassName, e, e.getLocalizedMessage(), true);
		}
		
		return false;
	}
	
	public boolean call_Caller_Encryption_XOR_Encrypt()
	{
		try
		{
			if(!encryptSourceData)
			{
				Drivers.jop_Error("You must Enable Encryption First", "Encryption Not Enabled");
				return false;
			}
			
						
			
			if(!verifyEncryption())
			{
				return false;
			}
			
				
			
			if(fleSourceFile == null || !fleSourceFile.exists() || fleEncryptionJAR == null || !fleEncryptionJAR.exists() || fleGeneratedEncryptionKey == null || !fleGeneratedEncryptionKey.exists() || fleEncryptionOutputDirectory == null || !fleEncryptionOutputDirectory.exists())
			{
				Drivers.jop_Error("Invalid Encryption Information Entered", "Invalid Encryption Paramaters Specified");
				return false;
			}
			
			File encryptedFile = Caller_Encryption_XOR.encryptFile(fleSourceFile, fleEncryptionJAR, fleGeneratedEncryptionKey, fleEncryptionOutputDirectory, this.jtxtpneInteractionContent);
						
			return true;
		}
		
		catch(Exception e)
		{
			Drivers.eop("call_Caller_Encryption_XOR_Encrypt", strMyClassName, e, e.getLocalizedMessage(), true);
		}
		
		return false;
	}
	
	public boolean verifyExternalJAR_Loaded()
	{
		try
		{
			if(this.alPath_To_JAR_Files == null || this.alPath_To_JAR_Files.size() < 1 || this.jcbExternal_JAR.getSelectedItem() == null || this.jcbExternal_JAR.getSelectedItem().toString().trim().equals(""))
			{
				Drivers.jop_Error("You must select load a top folder and select the JAR file in order to use this feature", "External JAR File Not Selected");
				
				Drivers.sop("\tVerification of External JAR file complete - * * * ERRORS DETECTED * * * - User Must Select Load Top Folder and Select JAR file to import");
				
				jlblPathToLoadedJAR_File_DownloadContent.setText("Not Specified");
				
				return false;
			}
			
			
			StegoFileSelection.fleExternalJAR = this.alPath_To_JAR_Files.get(this.jcbExternal_JAR.getSelectedIndex());
			this.jcbJAR_ToSendCommands.setSelectedIndex(this.jcbExternal_JAR.getSelectedIndex());
								
			
			Drivers.sop("Path to JAR to use: " + StegoFileSelection.fleExternalJAR.getCanonicalPath());
			
			jlblPathToLoadedJAR_File_DownloadContent.setText(StegoFileSelection.fleExternalJAR.getCanonicalPath());			
			
			return true;
		}
		catch(Exception e)
		{
			Drivers.eop("verifyExternalJAR_Loaded", strMyClassName, e, e.getLocalizedMessage(), true);
		}
		
		return false;
	}
	
	public boolean call_Caller_Encryption_XOR_Decryption()
	{
		try
		{
			
			
			File decryptedFile = Caller_Encryption_XOR.decryptFile(fleSourceFile, fleEncryptionJAR, fleGeneratedEncryptionKey, fleEncryptionOutputDirectory, this.jtxtpneInteractionContent);
										
			return true;
		}
		
		catch(Exception e)
		{
			Drivers.eop("call_Caller_Encryption_XOR_Decryption", strMyClassName, e, e.getLocalizedMessage(), true);
		}
		
		return false;
	}
	
	public boolean verifyExternalJAR_Checkbox_Selected()
	{
		try
		{
			if(!algorithm_ImportExternal_JAR)
			{
				Drivers.jop_Error("You must select \"" + this.cbImportExternalJar.getLabel() + "\" first in order to use this feature", "Selected Feature Only Supported via External JAR");
				return false;
			}
			
			return true;
		}
		catch(Exception e)
		{
			Drivers.eop("verifyExternalJAR_Selected", strMyClassName, e, e.getLocalizedMessage(), true);
		}
		
		return false;
	}
	
	public boolean ae_jbtnDownloadContent()
	{
		try
		{
			
			if(!verifyExternalJAR_Checkbox_Selected())
			{
				//Returning false from the above mtd call is an error, do not proceed here
				return false;
			}
			
			
			if(!verifyExternalJAR_Loaded()) 
			{
				//Returning false from the above mtd call is an error, do not proceed here
				return false;
			}
			
			
			if(this.jar_UseCustomeInstructions /*|| this.jar_EnterExternalCommands*/)
			{
				Drivers.jop_Error("\"" + cbgExternalJAR.getSelectedCheckbox().getLabel() + "\"" + " is not a supported feature yet.  Please use \"" + this.cbUseNative_API.getLabel() + "\" to continue.", "Selected Feature Not Supported");
				return true;
			}
			
			
			if(!this.verifyUpload_OR_DownloadAccountInfo())
			{
				Drivers.jop_Error("Unable to continue until user enters required information in the " + this.tabbedPane.getTitleAt(Drivers.UPLOAD_DOWNLOAD_CONTENT_TAB_PANE_INDEX) + " tab", "Upload Destination Information Missing");
				return false;
			}
			
			
			String strExternalCommand = null;
			
			if(jar_EnterExternalCommands)
			{
				File fleJAR = this.alPath_To_JAR_Files.get(this.jcbExternal_JAR.getSelectedIndex());
				this.jcbJAR_ToSendCommands.setSelectedIndex(this.jcbExternal_JAR.getSelectedIndex());
				
				//Drivers.sop("Location to contain downloaded content: " + StegoFileSelection.fleTopFolder_DownloadContent.getCanonicalPath());
				Drivers.sop("Path to JAR to use: " + fleJAR.getCanonicalPath());
				Drivers.sop("User is entering in external command");
				
				jlblPathToLoadedJAR_File_DownloadContent.setText(fleJAR.getCanonicalPath());
				jlblPathToSelectedJAR_UploadDestination.setText(fleJAR.getCanonicalPath());
								
				//tell each node to call its own uploader function
				for(int i = 0; i < this.alUploadDownload_DestinationPanels.size(); i++)
				{
										
					alUploadDownload_DestinationPanels.get(i).call_Caller_DownloadContent(fleJAR, jtxtpneInteractionContent, false, false, true);
				}
				
				return true;
			}			
			
						
			
			File fleJAR = this.alPath_To_JAR_Files.get(this.jcbExternal_JAR.getSelectedIndex());
			this.jcbJAR_ToSendCommands.setSelectedIndex(this.jcbExternal_JAR.getSelectedIndex());
								
			//Drivers.sop("Location to contain downloaded content: " + StegoFileSelection.fleTopFolder_DownloadContent.getCanonicalPath());
			Drivers.sop("Path to JAR to use: " + fleJAR.getCanonicalPath());
			
			jlblPathToLoadedJAR_File_DownloadContent.setText(fleJAR.getCanonicalPath());
			jlblPathToSelectedJAR_UploadDestination.setText(fleJAR.getCanonicalPath());
			
			for(int i = 0; i < this.alUploadDownload_DestinationPanels.size(); i++)
			{				
				alUploadDownload_DestinationPanels.get(i).call_Caller_DownloadContent(fleJAR, jtxtpneInteractionContent, this.jar_UseNative_API, this.jar_UseCustomeInstructions, this.jar_EnterExternalCommands);
			}
			
			//Caller_DownloadContent downloader = new Caller_DownloadContent(fleJAR, fleTopFolder_DownloadContent, strUserName, strUserPassword, jtxtpneDownloadContent, this.jar_UseNative_API, this.jar_UseCustomeInstructions, this.jar_EnterExternalCommands, strExternalCommand);
			
			return true;
		}
		
		catch(Exception e)
		{
			Drivers.eop("ae_jbtnDownloadContent", strMyClassName, e, e.getLocalizedMessage(), true);
		}
		
		return false;
	}
	
	public boolean ae_jbtnReComposeSourceFile()
	{
		try
		{
			
			boolean readyToContinue = true;
			
			if(StegoFileSelection.algorithm_ImportExternal_JAR) 
			{
				readyToContinue &= verifyExternalJAR_Loaded();
				
				if(readyToContinue && (StegoFileSelection.fleExternalJAR == null || !StegoFileSelection.fleExternalJAR.exists()))
				{
					Drivers.jop_Error("Please select a valid External JAR to import", "Invalid JAR File Selected");
					Drivers.sop("\tVerification of Import External JAR Instruction Set complete - * * * ERRORS DETECTED * * * - Invalide JAR File Selected.");
					
					readyToContinue = false;
				}
								
			}
			
			
			if(StegoFileSelection.algorithm_ImportExternal_JAR && (StegoFileSelection.jar_UseCustomeInstructions || this.jar_EnterExternalCommands))
			{
				Drivers.jop_Error("\"" + cbgExternalJAR.getSelectedCheckbox().getLabel() + "\"" + " is not a supported feature yet.  Please use \"" + this.cbUseNative_API.getLabel() + "\" to continue.", "Selected Feature Not Supported");
				Drivers.sop("\tVerification of Import External JAR Instruction Set complete - * * * ERRORS DETECTED * * * - Selected feature is not yet supported.");
				
				readyToContinue = false;
			}
			
			
			if(!readyToContinue)
			{
				//errors are already displayed above, so break out and do not continue
				return false;
			}
			
			StegoFileSelection.fleTopFolder_RecomposeSourceFile = Drivers.querySelectFile(true, "Please Select the Top Folder containing the carrier images to analyze", JFileChooser.DIRECTORIES_ONLY, false, false);
			
			if(StegoFileSelection.fleTopFolder_RecomposeSourceFile == null)
			{
				Drivers.sop("No File Selected. Nope, not here either!");
				return true;
			}
			
			else//a good file was selected, populate the list
			{
				Drivers.sop("Location to Top Folder containing all carrier images to analyze: " + StegoFileSelection.fleTopFolder_RecomposeSourceFile.getCanonicalPath());
				jlblOutputLocation.setText("Recompose File Top Folder: " + StegoFileSelection.fleTopFolder_RecomposeSourceFile.getCanonicalPath());
			}
			
			
			ArrayList <File> selectedFiles = Drivers.getFilesUnderSelectedDirectory(fleTopFolder_RecomposeSourceFile, null);
						
			
			if(StegoFileSelection.algorithm_ImportExternal_JAR && selectedFiles != null && selectedFiles.size() > 0)
			{				
				Drivers.sop("Selected Files: " );
				String strFleName = "";
				for(int i = 0; i < selectedFiles.size(); i++)
				{
					strFleName = selectedFiles.get(i).toString();
					Drivers.sop("\t" + strFleName.substring(strFleName.lastIndexOf("\\") + 1));					
									
				}
				
				
				Caller_ReComposer_JAR reComposer_JAR = new Caller_ReComposer_JAR(StegoFileSelection.fleExternalJAR, StegoFileSelection.fleTopFolder_RecomposeSourceFile);
				
				return true;
			}
			
			if(selectedFiles == null || selectedFiles.size() < 1)
			{
				Drivers.jop_Error("No files were found under specified location:" + "\n" + StegoFileSelection.fleTopFolder_RecomposeSourceFile.getCanonicalPath() + "\nHowever, will attempt to analyze already created Batch Directories under given folder path.", "Files not found under Top Folder");
				
				
				StegoReComposer_Caller.analyzeBatchDirectories(StegoFileSelection.fleTopFolder_RecomposeSourceFile);
				
				return true;
			}
			
			
			if(!this.verifyEncryption())
			{
				return false;
			}
			
			StegoReComposer_Caller reComposer = new StegoReComposer_Caller(StegoFileSelection.fleTopFolder_RecomposeSourceFile, selectedFiles, encryptSourceData, fleEncryptionJAR, fleGeneratedEncryptionKey);
			
			return true;
		}
		catch(Exception e)
		{
			Drivers.eop("ae_jbtnReComposeSourceFile", strMyClassName, e, e.getLocalizedMessage(), true);
		}
		
		return false;
	}
	
	public boolean ae_jbtnUploadContent()
	{
		try
		{
			
			if(!verifyExternalJAR_Checkbox_Selected()) 
			{
				//Returning false from the above mtd call is an error, do not proceed here
				return false;
			}
			
			
			if(!verifyExternalJAR_Loaded())
			{
				//Returning false from the above mtd call is an error, do not proceed here
				return false;
			}
			
			
			if(this.jar_UseCustomeInstructions /*|| this.jar_EnterExternalCommands*/)
			{
				Drivers.jop_Error("\"" + cbgExternalJAR.getSelectedCheckbox().getLabel() + "\"" + " is not a supported feature yet.  Please use \"" + this.cbUseNative_API.getLabel() + "\" to continue.", "Selected Feature Not Supported");
				return true;
			}
			
		
			if(!this.verifyUpload_OR_DownloadAccountInfo())
			{
				Drivers.jop_Error("Unable to continue until user enters required information in the Upload Destination Tab", "Upload Destination Information Missing");
				return false;
			}
			
			
			String strExternalCommand = null;
			
			if(jar_EnterExternalCommands)
			{
				File fleJAR = this.alPath_To_JAR_Files.get(this.jcbExternal_JAR.getSelectedIndex());
				this.jcbJAR_ToSendCommands.setSelectedIndex(this.jcbExternal_JAR.getSelectedIndex());
				
				Drivers.sop("Path to JAR to use: " + fleJAR.getCanonicalPath());
				Drivers.sop("User is entering in external command");
				
				jlblPathToLoadedJAR_File_DownloadContent.setText(fleJAR.getCanonicalPath());
				jlblPathToSelectedJAR_UploadDestination.setText(fleJAR.getCanonicalPath());				
								
				
				for(int i = 0; i < this.alUploadDownload_DestinationPanels.size(); i++)
				{
					alUploadDownload_DestinationPanels.get(i).call_Caller_UploadContent(fleJAR, jtxtpneInteractionContent, jar_UseNative_API, jar_UseCustomeInstructions, jar_EnterExternalCommands);
				}
				
				return true;
			}					
			
			
			File fleJAR = this.alPath_To_JAR_Files.get(this.jcbExternal_JAR.getSelectedIndex());
			this.jcbJAR_ToSendCommands.setSelectedIndex(this.jcbExternal_JAR.getSelectedIndex());
								
			Drivers.sop("Path to JAR to use: " + fleJAR.getCanonicalPath());
			
			jlblPathToLoadedJAR_File_DownloadContent.setText(fleJAR.getCanonicalPath());
			jlblPathToSelectedJAR_UploadDestination.setText(fleJAR.getCanonicalPath());
									
			
			for(int i = 0; i < this.alUploadDownload_DestinationPanels.size(); i++)
			{
				alUploadDownload_DestinationPanels.get(i).call_Caller_UploadContent(fleJAR, jtxtpneInteractionContent, jar_UseNative_API, jar_UseCustomeInstructions, jar_EnterExternalCommands);
			}
			
			return true;
		}
		
		catch(Exception e)
		{
			Drivers.eop("ae_jbtnUploadContent", strMyClassName, e, e.getLocalizedMessage(), true);
		}
		
		return false;
	}
	
	public boolean ae_jbtnSelectTopFolder()
	{
		try
		{
			StegoFileSelection.fleTopFolder_ToExternal_JAR = Drivers.querySelectFile(true, "Please Select the Top Folder containing the external JAR Files", JFileChooser.DIRECTORIES_ONLY, false, false);
			
			if(StegoFileSelection.fleTopFolder_ToExternal_JAR == null)
			{
				Drivers.sop("No File Was Selected. Nope!");
			}
			
			else
			{
				jcbExternal_JAR.removeAllItems();
				jcbJAR_ToSendCommands.removeAllItems();
				
				jbtnSelectTopFolder.setToolTipText("Path to Top Folder: " + fleTopFolder_ToExternal_JAR.getCanonicalPath());
				this.jcbExternal_JAR.setToolTipText("Path to Top Folder: " + fleTopFolder_ToExternal_JAR.getCanonicalPath());
				
				alPath_To_JAR_Files = Drivers.getFilesUnderSelectedDirectory(fleTopFolder_ToExternal_JAR, new String[]{"JAR"});
				
				if(alPath_To_JAR_Files != null && alPath_To_JAR_Files.size() > 0)
				{									
					
					String strFleName = "";
					
					for(int i = 0; i < alPath_To_JAR_Files.size(); i++)
					{
						strFleName = alPath_To_JAR_Files.get(i).getCanonicalPath();
						jcbExternal_JAR.addItem(strFleName.substring(strFleName.lastIndexOf("\\") + 1) + "  --> [" + strFleName + "]");
						jcbJAR_ToSendCommands.addItem(strFleName.substring(strFleName.lastIndexOf("\\") + 1));
					}
				}
				
				else if(alPath_To_JAR_Files == null || alPath_To_JAR_Files.size() < 1)
				{
					jcbExternal_JAR.addItem("No JAR Files found under Top Folder");
				}
			}
			
			return true;
		}
		catch(Exception e)
		{
			Drivers.eop("ae_jbtnSelectTopFolder", strMyClassName, e, e.getLocalizedMessage(), true);
		}
		
		return false;
	}
	
	public boolean ae_jbtnGo()
	{
		try
		{
			if(this.loadEmbedContent)
			{
				ae_jbtnEmbedContent();
			}
			else if(this.loadExtractContent)
			{
				ae_jbtnExtractContent();
			}
			else if(this.loadUploadContent)
			{
				this.ae_jbtnUploadContent();
			}
			
			else if(this.loadRecomposeSourceFiles)
			{
				this.ae_jbtnReComposeSourceFile();
			}
			
			else if(this.loadDownloadContent)
			{
				this.ae_jbtnDownloadContent();
			}
			else if(this.loadEncryption)
			{
				this.ae_jbtnEncryption();
			}
			
			else if(this.loadCookieJAR)
			{
				ae_jbtnCookieJAR();
			}
			
			return true;
		}
		catch(Exception e)
		{
			Drivers.eop("ae_jbtnGo", strMyClassName, e, e.getLocalizedMessage(), true);
		}
		
		return false;
	}
	
	
	public boolean readyToHarvestInformation()
	{
		try
		{
			
			boolean readyToContinue = true;
			
			
			
			if(this.imageSourceIsEnteredText == false && this.imageSourceIsSelectedFile == false)
			{
				readyToContinue &= false;
				
				Drivers.sop("\tVerification of Source File complete - * * * ERRORS DETECTED * * * - User Must Select to use Source File or Enter Source Text");
				
				this.jbtnAddSourceFile.setBackground(Color.red);
				this.jbtnEnterSourceText.setBackground(Color.red);
			}
			
			if(imageSourceIsSelectedFile)
			{
				readyToContinue &= verifySourceFile();					
			}
			
			else if(this.imageSourceIsEnteredText)
			{
				readyToContinue &= verifyEnteredText();
			}
			
			
			if(StegoFileSelection.algorithm_ImportExternal_JAR) 
			{
				readyToContinue &= verifyExternalJAR_Loaded();
				
				if(readyToContinue && (StegoFileSelection.fleExternalJAR == null || !StegoFileSelection.fleExternalJAR.exists()))
				{
					Drivers.jop_Error("Please select a valid External JAR File to import", "Invalid JAR File Selected");
					Drivers.sop("\tVerification of Import External JAR Instruction Set complete - * * * ERRORS DETECTED * * * - Invalide JAR File Selected.");
					
					readyToContinue &= false;
				}
			}
			
			
			if(StegoFileSelection.algorithm_ImportExternal_JAR && (StegoFileSelection.jar_UseCustomeInstructions || this.jar_EnterExternalCommands))
			{
				Drivers.jop_Error("\"" + cbgExternalJAR.getSelectedCheckbox().getLabel() + "\"" + " is not a supported feature yet.  Please use \"" + this.cbUseNative_API.getLabel() + "\" to continue.", "Selected Feature Not Supported");
				Drivers.sop("\tVerification of Import External JAR Instruction Set complete - * * * ERRORS DETECTED * * * - Selected feature is not yet supported.");
				
				readyToContinue &= false;
			}
									
			
			
			
			readyToContinue &= this.verifyEncryption();						
			readyToContinue &= this.verifyCarrierImagePaths();						
			readyToContinue &= this.verifyCarrierImageContentEmbedSize();				
			readyToContinue &= this.verifyUpload_OR_DownloadAccountInfo();			
			readyToContinue &= this.verifyOutputDirectory();			
			return readyToContinue;
		}
		catch(Exception e)
		{
			Drivers.eop("readyToHarvestInformation", strMyClassName, e, e.getLocalizedMessage(), true);
		}
		
		return false;
	}
	
	
	
	public boolean generateEncryptionKeys()
	{
		try
		{
			
			try
			{
				this.encryptionKeySize = Integer.parseInt(this.jtfEncryptionKeySize.getText().trim());
				
				if(encryptionKeySize < 1)
				{
					throw new Exception("Invalid key size. Must be greater than 0");
				}
				
				jtfEncryptionKeySize.setBackground(Color.white);
				jtfEncryptionKeySize.setForeground(Color.black);
				this.validate();
			}
			catch(Exception e)
			{
				jtfEncryptionKeySize.setBackground(Color.yellow);
				jtfEncryptionKeySize.setForeground(Color.red);
				
				Drivers.jop_Error("Please enter a valid Encryption Key Length", "Invalid Encryption Key Length");
				StegoFileSelection.fleEncryptionKeyDirectoryPath = null;
			
				return false;
			}
			
			
			if(alEncryptionPath_To_JAR_Files == null || alEncryptionPath_To_JAR_Files.size() < 1 || alEncryptionPath_To_JAR_Files.size() < jcbSelect_JAR_Encryption.getSelectedIndex())
			{
				Drivers.jop_Error("JAR Files do not appear to have been populated.  \nUnable to continue", "User Must Select Top Folder Containing Encryption JAR File");
				return false;
			}
						
			fleEncryptionJAR = this.alEncryptionPath_To_JAR_Files.get(this.jcbSelect_JAR_Encryption.getSelectedIndex());//the file in the arraylist corresponds to the selected 
			
			Drivers.sop("Path to Encryption JAR to use: " + fleEncryptionJAR.getCanonicalPath());
			Drivers.sop("User is entering in external command");
			
			jlblPathToEncryption_JAR.setText(fleEncryptionJAR.getCanonicalPath());				
		
			StegoFileSelection.fleEncryptionKeyDirectoryPath = Drivers.querySelectFile(false, "Please select the Directory to save the encryption keys", JFileChooser.DIRECTORIES_ONLY, false, false);
			
			if(fleEncryptionKeyDirectoryPath != null && fleEncryptionKeyDirectoryPath.isDirectory() && fleEncryptionKeyDirectoryPath.exists() && populateEncryptionKeys(fleEncryptionKeyDirectoryPath))
			{
				
				this.jbtnGenerateKeys.setBackground(Color.white);
				
				Drivers.sop("Encryption key size: " + this.encryptionKeySize + " bytes.  Attempting to generate key file now...");
								
				fleGeneratedEncryptionKey = Caller_Encryption_XOR.generateEncryptionKey(fleEncryptionJAR, encryptionKeySize, fleEncryptionKeyDirectoryPath, "key", "txt", this.jtxtpneInteractionContent);
				
				if(fleGeneratedEncryptionKey != null && fleGeneratedEncryptionKey.exists())
				{
					this.jtfEncryptionKeyPath.setText(fleGeneratedEncryptionKey.getCanonicalPath());
					this.jtfEncryptionKeyPath.setToolTipText(fleGeneratedEncryptionKey.getAbsolutePath());
				}
				else
				{
					this.jtfEncryptionKeyPath.setText(fleEncryptionKeyDirectoryPath.getCanonicalPath());
					this.jtfEncryptionKeyPath.setToolTipText(fleEncryptionKeyDirectoryPath.getAbsolutePath());
				}
			}
			else
			{
				return false;
			}
			
		}
		catch(Exception e)
		{
			Drivers.eop("saveEncryptionFolderPath", strMyClassName, e, e.getLocalizedMessage(), true);
		}
		
		return false;
	}
	
	
	
	
	public boolean verifyOutputDirectory()
	{
		try
		{
			if(this.fleCarrierImageSaveDirectory != null)
			{
				this.jbtnOutputTo.setBackground(Color.white);
				Drivers.sop("\tVerification of Output Carrier Image Save Directory Complete - No Errors detected");
				return true;
			}
			else
			{
				this.jbtnOutputTo.setBackground(Color.red);
				Drivers.sop("\tVerification of Output Carrier Image Save Directory Complete - * * * ERRORS DETECTED * * * - No Output Directory Selected");
				return false;
			}
		}
		catch(Exception e)
		{
			Drivers.eop("verifyOutputDirectory", strMyClassName, e, e.getLocalizedMessage(), true);
		}
		
		return false;
	}
	
	public boolean verifyTotalCarrierImageSize_Embed()
	{
		try
		{
			boolean totalSizeAcceptable = false;
			long deficiencCarrierFileByteSize = 0; 
			
			if(imageSourceIsSelectedFile && this.fleSourceFile != null)
			{
				totalSizeAcceptable = StegoEmbedder.verifyCarrierEmbedImageSize_IsGreaterThan_SourceImageFile(fleSourceFile.length(), alCarrierImagePaths_Panel);
				
				if(!totalSizeAcceptable)
				{
					deficiencCarrierFileByteSize = StegoEmbedder.calculateDeficiency_CarrierEmbedImageSize_IsGreaterThan_SourceImageFile(fleSourceFile.length(), alCarrierImagePaths_Panel);
				}
			}
			
			else if(this.imageSourceIsEnteredText && this.jtxtpneSourceText.getText() != null && !(this.jtxtpneSourceText.getText().trim().equals("")))
			{
				totalSizeAcceptable = StegoEmbedder.verifyCarrierEmbedImageSize_IsGreaterThan_SourceImageFile(jtxtpneSourceText.getText().trim().length(), alCarrierImagePaths_Panel);
				
				if(!totalSizeAcceptable)
				{
					deficiencCarrierFileByteSize = StegoEmbedder.calculateDeficiency_CarrierEmbedImageSize_IsGreaterThan_SourceImageFile(jtxtpneSourceText.getText().trim().length(), alCarrierImagePaths_Panel);
				}
			}
			
			if(totalSizeAcceptable)
			{
				Drivers.sop("\tDestination Carrier Images total size is greater than source content - Very Good! - No errors detected");
			}
			else if(!totalSizeAcceptable && (imageSourceIsSelectedFile != this.imageSourceIsEnteredText))
			{				
				String warningText = 	"";
				
				
				if(deficiencCarrierFileByteSize < 1)
				{
					warningText = 		"Your selected embed content size in the Carrier Image(s) is larger than the source content:" + "\n" +
										 Drivers.getFormattedFileSize_String(Math.abs(deficiencCarrierFileByteSize)) + " is the excess amount placed in the Carrier Image(s)." + "\n" +
										"\nPlease either select a larger source file to embed within the carrier images, or remove excess bytes from the carrier files to contain your source data.";
										
				}
				
				else if(deficiencCarrierFileByteSize == 1)
				{
					warningText = 		"Your selected source content is larger in size than the embed content size in the destination carrier image(s):" + "\n" +
										 Drivers.getFormattedFileSize_String(deficiencCarrierFileByteSize) + " still needs to be placed in the Carrier Image(s)." + "\n" +
										"\nPlease either select a smaller source file to embed within the carrier images, or add more carrier files to contain your source data.";
										
				}
				
				else
				{
					warningText = 		"Your selected source content is larger in size than the embed content size in the destination carrier image(s):" + "\n" +
										Drivers.getFormattedFileSize_String(deficiencCarrierFileByteSize) + " still need to be placed in the Carrier Image(s)." + "\n" +
										"\nPlease either select a smaller source file to embed within the carrier images, or add more carrier files to contain your source data.";						
					
				}
				
				Drivers.jop_Error(warningText, "Insufficient Size in Selected Carrier Image(s)");
			}
			
			return totalSizeAcceptable;
			
		}
		catch(Exception e)
		{
			Drivers.eop("verifyTotalImageSize", strMyClassName, e, e.getLocalizedMessage(), true);
		}
		
		return false;
	}
	
	public boolean verifyUpload_OR_DownloadAccountInfo()
	{
		try
		{
			boolean booleanUploadDownloadAccountsAreGoodToGo = true;
			
			if(this.alUploadDownload_DestinationPanels == null || this.alUploadDownload_DestinationPanels.size() < 1)
			{
				throw new Exception("alUploadDownload_DestinationPanels contains no Upload Account Information nodes.  It should contain at least one to continue");
			}
			
			for(int i = 0; i < this.alUploadDownload_DestinationPanels.size(); i++)
			{
				booleanUploadDownloadAccountsAreGoodToGo &= alUploadDownload_DestinationPanels.get(i).verifyMy_AccountInformation();
			}
			
			
			if(booleanUploadDownloadAccountsAreGoodToGo)
				Drivers.sop("\tVerification of Upload / Download Account Information complete - No Errors detected");
			else
				Drivers.sop("\tVerification of Upload / Download Account Information complete - * * * ERRORS DETECTED * * * ");
			
			return booleanUploadDownloadAccountsAreGoodToGo;
		}
		
		catch(Exception e)
		{
			Drivers.eop("verifyUploadDestinationAccountInfo", strMyClassName, e, e.getLocalizedMessage(), true);
		}
		
		
		Drivers.sop("\tVerification of Carrier Destination files complete - * * * ERRORS DETECTED * * * ");
		
		return false;
	}
	
	public boolean verifyCarrierImageContentEmbedSize()
	{
		try
		{
			boolean carrierContentEmbedSizeIsGoodToGo = true;
			
			if(this.alCarrierImagePaths_Panel == null || this.alCarrierImagePaths_Panel.size() < 1)
			{
				throw new Exception("alCarrierImagePaths_Panel contains no Carrier Image nodes.  It should contain at least one to continue");
			}
			
			for(int i = 0; i < this.alCarrierImagePaths_Panel.size(); i++)
			{
				carrierContentEmbedSizeIsGoodToGo &= alCarrierImagePaths_Panel.get(i).verifyMyCarrierImageContentEmbedSize(true);				
			}
						
			
			if(carrierContentEmbedSizeIsGoodToGo)
				Drivers.sop("\tVerification of Carrier Content embed/extract size complete - No Errors detected");
			else
				Drivers.sop("\tVerification of Carrier Content embed/extract size complete - * * * ERRORS DETECTED * * * ");
			
			return carrierContentEmbedSizeIsGoodToGo;
		}
		
		catch(Exception e)
		{
			Drivers.eop("verifyCarrierImageContentEmbedSize", strMyClassName, e, e.getLocalizedMessage(), true);
		}
		
		
		Drivers.sop("\tVerification of Carrier Content embed size complete - * * * ERRORS DETECTED * * * ");
		
		return false;
	}
	
	public boolean verifyCarrierImagePaths()
	{
		try
		{
			boolean carrierImagePathsAreGoodToGo = true;
			
			if(this.alCarrierImagePaths_Panel == null || this.alCarrierImagePaths_Panel.size() < 1)
			{
				throw new Exception("alCarrierImagePaths_Panel contains no Carrier Image nodes.  It should contain at least one to continue");
			}
			
			for(int i = 0; i < this.alCarrierImagePaths_Panel.size(); i++)
			{
				carrierImagePathsAreGoodToGo &= alCarrierImagePaths_Panel.get(i).verifyMyCarrierImagePath();				
			}
			
			indicateTotalCarrierFileSize();
			
			if(carrierImagePathsAreGoodToGo)
				Drivers.sop("\tVerification of Carrier Destination files complete - No Errors detected");
			else
				Drivers.sop("\tVerification of Carrier Destination files complete - * * * ERRORS DETECTED * * * ");
			
			return carrierImagePathsAreGoodToGo;
		}
		
		catch(Exception e)
		{
			Drivers.eop("verifyCarrierImagePaths", strMyClassName, e, e.getLocalizedMessage(), true);
		}
		
		
		Drivers.sop("\tVerification of Carrier Destination files complete - * * * ERRORS DETECTED * * * ");
		
		return false;
	}
	
	public static boolean indicateTotalCarrierFileSize()
	{
		try
		{
			
			String strTotalCarrierFileSize_Unformatted = Drivers.calculateTotalFileSizeFromCarrierImages_String(alCarrierImagePaths_Panel);
			
			
			try
			{
				jlblTotalCarrierImageFileSizeAvailable.setText(Drivers.getFormattedFileSize_String(Long.parseLong(strTotalCarrierFileSize_Unformatted)));
			}
			catch(Exception e)
			{
				jlblTotalCarrierImageFileSizeAvailable.setText(strTotalCarrierFileSize_Unformatted + " bytes");
			}
			
			
			jlblTotalCarrierImageFileSizeAvailable.setToolTipText("Total File Size in Carrier Images: " + strTotalCarrierFileSize_Unformatted + " bytes");
			
			
			
			String strTotalEmbedCarrierFileSize_Unformatted = Drivers.calculateTotalEmbedSizeFromCarrierImages_String(alCarrierImagePaths_Panel, true);
			String strTotalEmbedCarrierFileSize = "";
			
			
			try
			{
				strTotalEmbedCarrierFileSize = Drivers.getFormattedFileSize_String(Long.parseLong(strTotalEmbedCarrierFileSize_Unformatted));
			}
			catch(Exception e)//incase it returns "number is greater than a previous <value>"
			{
				strTotalEmbedCarrierFileSize = strTotalEmbedCarrierFileSize_Unformatted + " bytes";
			}
			
			jlblTotalCarrierImageFileSizeSelectedToEmbed.setText(strTotalEmbedCarrierFileSize);
			jlblTotalCarrierImageFileSizeSelectedToEmbed.setToolTipText("Total Size of data to embed in Carrier Images: " + strTotalEmbedCarrierFileSize_Unformatted + " bytes");
			
			return true;
		}
		
		catch(Exception e)
		{
			Drivers.eop("indicateTotalCarrierFileSize", strMyClassName, e, e.getLocalizedMessage(), true);
		}
		
		return false;
	}
		
	public boolean verifyEncryptionFolderPath()
	{
		try
		{
			if(!encryptSourceData)
			{
				//return true if we're not going to encrypt any data... no need to check encryption data if its not going to be used
				Drivers.sop("\tVerification of Encryption Key Size and Path to Encryption Folder Path complete - Encryption is not enabled therefore --> No Errors detected");				
				return true;
			}
			
			if(this.encryptionKeySize > 0 && this.fleGeneratedEncryptionKey != null && fleGeneratedEncryptionKey.exists() && fleGeneratedEncryptionKey.isFile())
			{								
				Drivers.sop("\tVerification of Encryption Key Size and Path to Encryption Folder Path complete - No Errors detected");
				
				this.jbtnGenerateKeys.setBackground(Color.white);
				this.jtfEncryptionKeyPath.setBackground(Drivers.clrBackground);
				
				return true;			
			}
		}
		
		catch(Exception e)
		{
			Drivers.eop("verifyEncryptionFolderPath", strMyClassName, e, e.getLocalizedMessage(), true);
		}
						
		Drivers.sop("\t\tVerification of Encryption Key Size and Encryption Folder Path complete - * * * ERRORS DETECTED - Encryption key size or folder path is not configured properly * * * ");
				
		jtfEncryptionKeyPath.setBackground(Color.yellow);
		jtfEncryptionKeySize.setBackground(Color.yellow);
		this.jbtnGenerateKeys.setBackground(Color.red);
		
		return false;
	}
	
	public boolean populateEncryptionKeys(File fleEncryptionDirectoryPath)
	{
		try
		{
			
			
			ArrayList<File> alFilesInDirectory = Drivers.getFilesUnderSelectedDirectory(fleEncryptionDirectoryPath, false);
			
			if(alFilesInDirectory != null && alFilesInDirectory.size() > 1)
			{
				if(StegoFileSelection.alEncryptionKeys.size() >= 2)
				{
					if(Drivers.jop_Confirm("NOTE: It appears you have already specified a directory which contains a public and private key. \nDo you wish to select a different directory?", "Change Private/Public Key Directory") == JOptionPane.YES_OPTION)  
					{
						StegoFileSelection.alEncryptionKeys.clear();
						
						//now fall through to add the new public/private key paths
					}
					else//user selected no/cancel and wishes to keep the current key pair
					{
						return false;
					}
				}
				
				File fleCurr = null;
				
				for(int i = 0; i < alFilesInDirectory.size(); i++)
				{
					fleCurr = alFilesInDirectory.get(i);
					if(fleCurr != null && (fleCurr.toString().toUpperCase().endsWith(Drivers.strExpectedName_EncryptionKey_PUBLIC.toUpperCase()) || fleCurr.toString().toUpperCase().endsWith(Drivers.strExpectedName_EncryptionKey_PRIVATE.toUpperCase())))
					{
						if(StegoFileSelection.alEncryptionKeys != null && !StegoFileSelection.alEncryptionKeys.contains(fleCurr))
						{
							//Drivers.sop("* * Adding: " + fleCurr);																			
							StegoFileSelection.alEncryptionKeys.add(fleCurr);
						}
					}
				}
				
			}
			
			return true;
		}
		catch(Exception e)
		{
			Drivers.eop("populateEncryptionKeys", strMyClassName, e, e.getLocalizedMessage(), true);
		}
		
		return false;
	}
	
	
	
	
	public boolean verifyEnteredPassword()
	{
		try
		{
			if(this.jtfEncryptionKeyPath.getText() != null && !(this.jtfEncryptionKeyPath.getText().trim().equals("")))
			{
				strPassword = this.jtfEncryptionKeyPath.getText().trim();
				
				Drivers.sop("\tVerification of Password - No Errors detected");
				
				jtfEncryptionKeyPath.setBackground(Color.white);
				
				return true;			
			}
		}
		catch(Exception e)
		{
			Drivers.eop("verifyEnteredPassword", strMyClassName, e, e.getLocalizedMessage(), true);
		}
		
		strPassword = "";
		
		Drivers.sop("\tVerification of Password complete - * * * ERRORS DETECTED - User Does not want to enter encryption password * * * ");
				
		jtfEncryptionKeyPath.setBackground(Color.yellow);
		
		return false;
	}
	
	public boolean verifyEnteredText()
	{
		try
		{
			if(this.jtxtpneSourceText.getText() != null && !(this.jtxtpneSourceText.getText().trim().equals("")))
			{
				strSourceText = this.jtxtpneSourceText.getText().trim();
				
				Drivers.sop("\tVerification of Source Text complete - No Errors detected");
				
				this.enableSourceTextInsertion();
				
				//Indicate File Size
				String strFileSize = Drivers.getFormattedFileSize_String(strSourceText.length());
				indicateSourceSize(strSourceText.length());
				
				return true;			
			}
		}
		catch(Exception e)
		{
			Drivers.eop("verifyEnteredText", strMyClassName, e, e.getLocalizedMessage(), true);
		}
		
		strSourceText = "";
		
		Drivers.sop("\tVerification of Source Text complete - * * * ERRORS DETECTED * * * ");
				
		
		this.jbtnEnterSourceText.setBackground(Color.red);
		
		return false;
	}
	
	public boolean verifySourceFile()
	{
		try
		{
			if(fleSourceFile != null && this.jtfSourceFilePath.getText() != null && !(this.jtfSourceFilePath.getText().trim().equals("")) && fleSourceFile.exists() && fleSourceFile.isFile())
			{
				this.jtfSourceFilePath.setForeground(Color.black);
				
				Drivers.sop("\tVerification of Source File complete - No Errors detected");
				
				this.enableSourceFilePathSelection();
				
				return true;			
			}
		}
		catch(Exception e)
		{
			Drivers.eop("verifySourceFile", strMyClassName, e, e.getLocalizedMessage(), true);
		}
		
		
		Drivers.sop("\tVerification of Source File complete - * * * ERRORS DETECTED * * * ");
		
		this.jbtnAddSourceFile.setBackground(Color.red);
		
		return false;
	}
	
	public boolean ae_jbtnEmbedContent()
	{
		try
		{
			if(readyToHarvestInformation())
			{
				
				if(this.verifyTotalCarrierImageSize_Embed())
				{
					Drivers.sop("Verification of information complete.  Ready to harvest information and begin file splitting");
					
					f(imageSourceIsSelectedFile)
					{						
						this.callStegoWriter(imageSourceIsSelectedFile, false);
					}
					
					else if(imageSourceIsEnteredText)
					{						
						callStegoWriter(false, imageSourceIsEnteredText); 
					}
					
				}
				
				
				return true;
			}
			
			Drivers.sop("Verification of information complete.  - * * ERRORS NOTED IN VERIFICATION * * * ");
			Drivers.jop_Error("Unable to continue until You correct the highlighted sections", "* * * Errors Noted * * *");
			
			
		}
		catch(Exception e)
		{
			Drivers.eop("ae_jbtnEmbedContent", strMyClassName, e, e.getLocalizedMessage(), true);
		}
		
		return false;
	}
	
	public boolean callStegoWriter(boolean embedSourceFile, boolean embedSourceText)
	{
		try
		{
			String strBatchNum = Drivers.jop_Input("Please enter a " + Drivers.maxBatchIdentifierSize + " char batch name/num to uniquely identify this set of files", "Enter Batch Number", true);
			
			if(strBatchNum == null || strBatchNum.trim().equals("") || strBatchNum.length() != Drivers.maxBatchIdentifierSize)
				return false;
			
			Drivers.sop("Calling Caller_StegoEmbedder");

			if(embedSourceFile)
			{
				caller_StegoEmbedder = new Caller_StegoEmbedder(this, getEncryption_JAR(), encryptSourceData, this.encryptionKeySize, this.fleGeneratedEncryptionKey, StegoFileSelection.algorithm_ImportExternal_JAR, StegoFileSelection.fleExternalJAR, true, false, StegoFileSelection.fleSourceFile, null, strBatchNum, alCarrierImagePaths_Panel, fleCarrierImageSaveDirectory);
			}
			else if(embedSourceText)
			{
				caller_StegoEmbedder = new Caller_StegoEmbedder(this, getEncryption_JAR(), encryptSourceData, this.encryptionKeySize, this.fleGeneratedEncryptionKey, StegoFileSelection.algorithm_ImportExternal_JAR, StegoFileSelection.fleExternalJAR, false, true, null, strSourceText, strBatchNum, alCarrierImagePaths_Panel, fleCarrierImageSaveDirectory);
			}
			
			return true;
		}
		catch(Exception e)
		{
			Drivers.eop("callStegoWriter", strMyClassName, e, e.getLocalizedMessage(), true);
		}
		
		return false;
	}
	
	public boolean callStegoWriter_FirstInstance()
	{
		try
		{
			
			JPanel_AddCarrierImagePath_OR_UploadDestination currCarrierPath = this.alCarrierImagePaths_Panel.get(0);
			
			String strBatchNum = Drivers.jop_Input("Please enter a " + Drivers.maxBatchIdentifierSize + " char batch name/num to uniquely identify this set of files", "Enter Batch Number", true);
			
			if(strBatchNum == null || strBatchNum.trim().equals("") || strBatchNum.length() != Drivers.maxBatchIdentifierSize)
				return false;
			
			int currIndex = 1;
			int numCarrierFilesTot = 1;
			
			String strCurrIndex = Drivers.formatStringWithLeadingZeros(""+currIndex, Drivers.maxCurrIndexSize);
			
			String strNumCarrierFilesTot = Drivers.formatStringWithLeadingZeros("" + numCarrierFilesTot, Drivers.maxOf_CurrIndexSize);//"" + numCarrierFilesTot;
			String strMessageFileExtensionType = Drivers.formatStringWithLeadingZeros( "" + "01", Drivers.maxNumFileExtensionChars);// "" + "01";
			
			byte [] arrSourceMsgToEmbed = strSourceText.getBytes();
			byte [] arrBatchNum = strBatchNum.getBytes();
			byte [] arrCurrIndexNum = strCurrIndex.getBytes();
			byte [] arrNumCarrierFilesTot = strNumCarrierFilesTot.getBytes();
			byte [] arrMessageFileExtensionType = strMessageFileExtensionType.getBytes();
		
			StegoEmbedder stegowriter = new StegoEmbedder(fleEncryptionJAR, encryptSourceData, this.encryptionKeySize, this.fleGeneratedEncryptionKey, arrSourceMsgToEmbed, currCarrierPath.getMyEmbedContentSize(false), arrBatchNum, arrCurrIndexNum, arrNumCarrierFilesTot, arrMessageFileExtensionType,  Drivers.getFileExtension_ByteArray(this.alCarrierImagePaths_Panel.get(0).getMyCarrierFilePath(), true), this.alCarrierImagePaths_Panel.get(0).getMyCarrierFilePath(), fleCarrierImageSaveDirectory);
			
			return true;
		}
		catch(Exception e)
		{
			Drivers.eop("callStegoWriter_FirstInstance", strMyClassName, e, e.getLocalizedMessage(), true);
		}
		
		return false;
	}
	
	public File getEncryption_JAR()
	{
	fleEncryptionJAR = null;
		
		
		try
		{
			if(!this.verifyEncryption())
			{
				Drivers.sop("\tVerification of Encryption complete - * * * ERRORS DETECTED * * * ");
				return null;
			}
			
			
			
			if(encryptSourceData)
			{
				fleEncryptionJAR = this.alEncryptionPath_To_JAR_Files.get(this.jcbSelect_JAR_Encryption.getSelectedIndex());//the file in the arraylist corresponds to the selected
				
				Drivers.sop("Path to Encryption JAR to use: " + fleEncryptionJAR.getCanonicalPath());
				Drivers.sop("User is entering in external command");
				
				jlblPathToEncryption_JAR.setText(fleEncryptionJAR.getCanonicalPath());		
			}
		}
		catch(Exception e)
		{
			Drivers.eop("getEncryption_JAR", strMyClassName, e, e.getLocalizedMessage(), true);
		}
		
				
		return fleEncryptionJAR;
	}
	
	public boolean saveAccountInformationTo_CSV(File fleToSave)
	{
		try
		{
			Drivers.sop("in saveAccountInformationTo_CSV, attempting to save to " + fleToSave.toString());
			
			PrintWriter pwOut = new PrintWriter(new BufferedOutputStream(new FileOutputStream(fleToSave.toString())));
			String strOut = "";
			
			//Loop to print the information
			for(int i = 0; i < this.alUploadDownload_DestinationPanels.size(); i++)
			{
				strOut = alUploadDownload_DestinationPanels.get(i).getAccountInfo_CSV();
				
				if(strOut != null)
				{
					pwOut.println(strOut);
					pwOut.flush();
				}
			}
			
			pwOut.close();
			
			return true;
		}
		
		catch(IOException ioe)
		{
			Drivers.sop("Exception caught in saveAccountInformationTo_CSV mtd in " + this.strMyClassName + " Perhaps this is a result of file is already in use...");
		}
		
		catch(Exception e)
		{
			Drivers.eop("saveAccountInformationTo_CSV", strMyClassName, e, e.getLocalizedMessage(), true);
		}
		
		return false;
	}
	
	public boolean ae_jbtnSaveTo_CSV()
	{
		try
		{
			if(this.alUploadDownload_DestinationPanels.size() < 1)
			{
				Drivers.sop("Insufficient Upload Destination account size to continue.  Must have at least one user identified");
				return false;
			}
			
			
			File fleSaveFile_CSV = Drivers.querySelectFile(false, "Save Account Type Information as CSV", JFileChooser.FILES_ONLY, true, false);
			
		
			int selection = -1;
			
			if(fleSaveFile_CSV!= null && fleSaveFile_CSV.exists())
			{
				selection = Drivers.jop_Confirm("Selected File Already Exists.  \nDo you wish to overwrite it?", "Overwrite Existing File?");
			}
			
			
			if(fleSaveFile_CSV != null && fleSaveFile_CSV.exists() || (fleSaveFile_CSV != null && fleSaveFile_CSV.exists() && selection == JOptionPane.YES_OPTION))
			{
				saveAccountInformationTo_CSV(fleSaveFile_CSV);
			}
			
			
			
			return true;
		}
		catch(Exception e)
		{
			Drivers.eop("ae_jbtnSaveTo_CSV", strMyClassName, e, e.getLocalizedMessage(), true);
		}
		
		return false;
	}
	
	public boolean ae_jbtnExtractContent()
	{
		try
		{
			boolean readyToContinue = true;
			
			if(StegoFileSelection.algorithm_ImportExternal_JAR) 
			{
				readyToContinue &= verifyExternalJAR_Loaded();
				
				if(readyToContinue && (StegoFileSelection.fleExternalJAR == null || !StegoFileSelection.fleExternalJAR.exists()))
				{
					Drivers.jop_Error("Please select a valid External JAR to import", "Invalid JAR File Selected");
					Drivers.sop("\tVerification of Import External JAR Instruction Set complete - * * * ERRORS DETECTED * * * - Invalide JAR File Selected.");
					
					readyToContinue &= false;
				}
								
			}
			
			
			if(StegoFileSelection.algorithm_ImportExternal_JAR && (StegoFileSelection.jar_UseCustomeInstructions || this.jar_EnterExternalCommands))
			{
				Drivers.jop_Error("\"" + cbgExternalJAR.getSelectedCheckbox().getLabel() + "\"" + " is not a supported feature yet.  Please use \"" + this.cbUseNative_API.getLabel() + "\" to continue.", "Selected Feature Not Supported");
				Drivers.sop("\tVerification of Import External JAR Instruction Set complete - * * * ERRORS DETECTED * * * - Selected feature is not yet supported.");
				
				readyToContinue &= false;
			}
			
			if(StegoFileSelection.algorithm_ImportExternal_JAR && !verifyOutputDirectory())
			{
				Drivers.jop_Error("Please refer to highlighted section.\nYou must select an output directory to save extracted messages", "Output Directory Not Specified");
				readyToContinue &= false;
			}
			
			if(!readyToContinue)
			{
				//errors are already displayed above, so break out and do not continue
				return false;
			}
								
			
			indicateTotalCarrierFileSize();
			
			cleanGUI();
			
			Drivers.sop("Verifying ready to harvest information...");
			
			if(this.verifyCarrierImagePaths() && this.verifyCarrierImageContentEmbedSize() && this.verifyEncryption())
			{
				JPanel_AddCarrierImagePath_OR_UploadDestination currCarrier = null;
				Caller_Extractor_JAR extractorJAR = null;
				
				
				if(StegoFileSelection.algorithm_ImportExternal_JAR)
				{
					
					for(int i = 0; i < alCarrierImagePaths_Panel.size(); i++)
					{
						currCarrier = alCarrierImagePaths_Panel.get(i);
						extractorJAR = new Caller_Extractor_JAR(StegoFileSelection.fleExternalJAR, currCarrier.getMyCarrierFilePath(), StegoFileSelection.fleCarrierImageSaveDirectory);
					}
					
				}
				else
				{
					
					currCarrier = this.alCarrierImagePaths_Panel.get(0);								
					StegoExtractor stegoreader = new StegoExtractor(encryptSourceData, currCarrier.getMyCarrierFilePath(), currCarrier.getMyEmbedContentinCarrierFileSize(false), currCarrier.getMyIndexNumber(), this.alCarrierImagePaths_Panel.size(), false, this.fleEncryptionJAR, this.fleGeneratedEncryptionKey);//File fleToExtrct, int numBytesRead, int orderNum, int totalCarriers					
				}
				
				
				
				
				return true;
			}
			
			Drivers.sop("Verification of information complete.  - * * ERRORS NOTED IN VERIFICATION * * * ");
			Drivers.jop_Error("Unable to continue until You correct the highlighted sections", "* * * Errors Noted * * *");
			
		}
		catch(Exception e)
		{
			Drivers.eop("ae_jbtnExtractContent", strMyClassName, e, e.getLocalizedMessage(), true);
		}
		
		return false;
	}
	
	public boolean cleanGUI()
	{
		try
		{
			this.jtfEncryptionKeyPath.setBackground(Color.white);
			this.jtfEncryptionKeyPath.setForeground(Color.black);
			
			this.jbtnAddSourceFile.setBackground(Color.white);
			this.jbtnEnterSourceText.setBackground(Color.white);
			this.jbtnOutputTo.setBackground(Color.white);
			
			
			for(int i = 0; i < this.alUploadDownload_DestinationPanels.size(); i++)
			{
				this.alUploadDownload_DestinationPanels.get(i).clearMyGUI();
			}
			
			return true;
		}
		catch(Exception e)
		{
			Drivers.eop("cleanGUI", strMyClassName, e, e.getLocalizedMessage(), true);
		}
		
		return false;
		
	}
	
	public boolean addAccounts_CSV(File fleToOpen)
	{
		try
		{
			if(fleToOpen == null || !fleToOpen.isFile())
				return false;
			
			BufferedReader brOpen = new BufferedReader(new FileReader(fleToOpen.toString()));
			
			String line = brOpen.readLine();
			
			String csvLine[] = null;
			
			JPanel_AddCarrierImagePath_OR_UploadDestination panelToAdd = null;
			
			while(line != null)
			{
				
				
				if(line.contains(","))
				{				
					csvLine = line.split(",");
													
					//len should == 3 for login name, password, and account type url
					if(csvLine.length == 3)
					{
						//add to the arraylist
						
						panelToAdd = new JPanel_AddCarrierImagePath_OR_UploadDestination(this, 0, null, csvLine[0], csvLine[1], csvLine[2]);
						
						if(panelToAdd.addThisPanel)
						{
							this.alUploadDownload_DestinationPanels.add(0, panelToAdd);
						}
					}
				}
				
				line = brOpen.readLine();
			}
			
			brOpen.close();
			
			populateUploadDestinationAccounts();
			
			return true;
		}
		catch(Exception e)
		{
			Drivers.eop("addAccounts_CSV", strMyClassName, e, e.getLocalizedMessage(), true);
		}
		
		return false;
	}
	
	public boolean ae_addAccounts_CSV()
	{
		try
		{
			
			
			File fleLoadFile_CSV = Drivers.querySelectFile(true, "Select the CSV file to Load", JFileChooser.FILES_ONLY, true, false);
			
			if(fleLoadFile_CSV != null && fleLoadFile_CSV.isFile())
			{
				addAccounts_CSV(fleLoadFile_CSV);
			}
			
			return true;
		}
		catch(Exception e)
		{
			Drivers.eop("ae_addAccounts_CSV", strMyClassName, e, e.getLocalizedMessage(), true);
		}
		
		return false;
	}
	
	public boolean ae_jbtnOutputTo()
	{
		try
		{
			File fleDirectoryPath = null;
			
			if(this.loadCookieJAR)
			{
				fleDirectoryPath = Drivers.querySelectFile(false, "Please Select the Directory to save the packaged JAR file when complete", JFileChooser.DIRECTORIES_ONLY, false, false);
			}
			else
			{
				fleDirectoryPath = Drivers.querySelectFile(false, "Please Select the Directory to save the carrier images when complete", JFileChooser.DIRECTORIES_ONLY, false, false);
			}			
			
						
			if(fleDirectoryPath != null && fleDirectoryPath.isDirectory() && fleDirectoryPath.exists())
			{
				fleCarrierImageSaveDirectory = fleDirectoryPath;
				this.jlblOutputLocation.setText(fleCarrierImageSaveDirectory.getCanonicalPath());
				this.jlblOutputLocation.setToolTipText(fleCarrierImageSaveDirectory.getCanonicalPath());
				
				this.jbtnOutputTo.setBackground(Color.white);
			}
			
			return true;
		}
		catch(Exception e)
		{
			Drivers.eop("ae_jbtnOutputTo", strMyClassName, e, e.getLocalizedMessage(), true);
		}
		
		return false;
	}
	
	public boolean ae_jbtnAddDirectory()
	{
		try
		{
			File fleDirectoryPath = Drivers.querySelectFile(true, "Please Select the Source Directory of images to receive the steganographic content", JFileChooser.DIRECTORIES_ONLY, false, false);
			
			if(fleDirectoryPath != null)
			{
				ArrayList<File> alFilePathsFromDirectory = Drivers.getFilesUnderSelectedDirectory(fleDirectoryPath, true);
				
				if(alFilePathsFromDirectory != null && alFilePathsFromDirectory.size() > 0)
				{
					//Add the Source Images to the GUI
					for(int j = 0; j < alFilePathsFromDirectory.size(); j++)
					{
						this.alCarrierImagePaths_Panel.add(new JPanel_AddCarrierImagePath_OR_UploadDestination(this, 1, alFilePathsFromDirectory.get(j), null, null, null));
						
					}
					
					populateCarrierImagePaths();
					
				}
				else
				{
					Drivers.sop("It doesn't appear user selected a directory with image files within it");
				}
			}
			
			else
			{
				Drivers.sop("User did not select a directory to load");
			}
			
			return true;
		}
		catch(Exception e)
		{
			Drivers.eop("ae_jbtnAddDirectory", strMyClassName, e, e.getLocalizedMessage(), true);
		}
		
		return false;
	}
	
	public boolean ae_jbtnAddSourceFile()
	{
		try
		{
			this.enableSourceFilePathSelection();
			
			StegoFileSelection.fleSourceFile = Drivers.querySelectFile(true, "Please Select the Source File to be inserted into the other image(s)", JFileChooser.FILES_ONLY, false, false);
			
			if(StegoFileSelection.fleSourceFile == null)
			{
				this.jtfSourceFilePath.setToolTipText("No Source File Selected");
				this.jtfSourceFilePath.setText("");
			}
			
			else
			{
				this.jtfSourceFilePath.setText(fleSourceFile.toString());
				this.jtfSourceFilePath.setToolTipText(fleSourceFile.toString());
				
				String strFileSize = Drivers.getFormattedFileSize_String(fleSourceFile.length());
				indicateSourceSize(fleSourceFile.length());
			}
			
			return true;
		}
		catch(Exception e)
		{
			Drivers.eop("ae_jbtnAddSource", strMyClassName, e, e.getLocalizedMessage(), true);
		}
		
		return false;
	}
	
	public void enableSourceFilePathSelection()
	{
		this.jtfSourceFilePath.setBackground(SystemColor.white);
		this.jtfSourceFilePath.setEditable(false);
		
		
		this.jtxtpneSourceText.setBackground(SystemColor.scrollbar);
		this.jtxtpneSourceText.setEditable(false);	
		
		
		this.jbtnAddSourceFile.setBackground(this.clrSelectedButton);
		this.jbtnEnterSourceText.setBackground(this.clrOriginalJButtonBackground);
		
		this.jlblStatus_SourceFile.setText("Source File");
		this.jlblStatus_SourceFile.setToolTipText("Indicates the Steganographic content to be placed in the selected image(s) will come from the file selected by the user");
		
		imageSourceIsSelectedFile = true;
		imageSourceIsEnteredText = !imageSourceIsSelectedFile;
	}
	
	public void enableSourceTextInsertion()
	{
		this.jtfSourceFilePath.setBackground(SystemColor.scrollbar);
		this.jtfSourceFilePath.setEditable(false);
		
		
		this.jtxtpneSourceText.setBackground(SystemColor.white);
		this.jtxtpneSourceText.setEditable(true);		
		
		
		this.jbtnEnterSourceText.setBackground(this.clrSelectedButton);
		this.jbtnAddSourceFile.setBackground(this.clrOriginalJButtonBackground);
		
		this.jlblStatus_SourceFile.setText("Source Text");
		this.jlblStatus_SourceFile.setToolTipText("Indicates the Steganographic content to be placed in the selected image(s) will come from the text entered by the user");
		
		imageSourceIsSelectedFile = false;
		imageSourceIsEnteredText = !imageSourceIsSelectedFile;
	}
	
	
	public boolean addUploadDestinationAccountInfo()
	{
		try
		{
			this.alUploadDownload_DestinationPanels.add(0, new JPanel_AddCarrierImagePath_OR_UploadDestination(this, 0, null, null, null, null));			
			populateUploadDestinationAccounts();
			
			return true;
		}
		
		catch(Exception e)
		{
			Drivers.eop("addUploadDestinationAccountInfo", this.strMyClassName, e, e.getLocalizedMessage(), true);
		}
		
		return false;
	}
	
	
	public boolean addCarrierImagePath()
	{
		try
		{
			if(alCarrierImagePaths_Panel!= null && alCarrierImagePaths_Panel.size() < Drivers.maxNumOfCarrierFilePaths)
			{
				this.alCarrierImagePaths_Panel.add(0, new JPanel_AddCarrierImagePath_OR_UploadDestination(this, 1, null, null, null, null));
				populateCarrierImagePaths();
			}
			else
			{
				Drivers.jop_Error("At this time, you cannot add more than " + Drivers.maxNumOfCarrierFilePaths + "\nPlease consider removing carrier image paths if possible", "Max Number of Carrier Images Reached");
			}
			
			return true;
		}
		catch(Exception e)
		{
			Drivers.eop("addCarrierImagePath", strMyClassName, e, e.getLocalizedMessage(), true);
		}
		
		return false;
		
	}
	
	
	public boolean populateUploadDestinationAccounts()
	{
		try
		{						
			if(this.alUploadDownload_DestinationPanels == null || this.alUploadDownload_DestinationPanels.size() < 1)
				return false;
			
			
			this.jpnlUploadDestinationAccounts = new JPanel(new GridLayout(this.alUploadDownload_DestinationPanels.size()/*+1*/, 1));
			
			
			
			for(int i = 0; i < this.alUploadDownload_DestinationPanels.size(); i++)
			{
				this.jpnlUploadDestinationAccounts.add(this.alUploadDownload_DestinationPanels.get(i));
				
				(this.alUploadDownload_DestinationPanels.get(i)).setMyIndexNumber(i);
			}					
			
			
			this.jscrlpneUploadDestinationAccounts.setViewportView(jpnlUploadDestinationAccounts);
			
			this.jlblNumUploadAccounts.setText(""+ alUploadDownload_DestinationPanels.size()); 
			this.jlblNumUploadAccounts.setToolTipText("("+ alUploadDownload_DestinationPanels.size() + ") Upload Account(s) to post Stegged Images");
			
			this.validate();
			jpnlUploadDestinationAccounts.validate();
			
			return true;
		}
		catch(Exception e)
		{
			Drivers.eop("populateUploadDestinationAccounts", strMyClassName, e, e.getLocalizedMessage(), true);			
		}
		
		this.validate();
		jpnlUploadDestinationAccounts.validate();
		
		return false;
	}
	
	
	public boolean populateCarrierImagePaths()
	{
		try
		{
			if(this.alCarrierImagePaths_Panel == null || this.alCarrierImagePaths_Panel.size() < 1)
				return false;
			
			jpnlCarrierImagePaths = new JPanel(new GridLayout(alCarrierImagePaths_Panel.size(), 1));
			
			for(int i = 0; i < this.alCarrierImagePaths_Panel.size(); i++)
			{
				this.jpnlCarrierImagePaths.add(this.alCarrierImagePaths_Panel.get(i));
				
				(this.alCarrierImagePaths_Panel.get(i)).setMyIndexNumber(i);
				
			}
			
			this.jscrlpneCarrierImagePaths.setViewportView(jpnlCarrierImagePaths);
			
			this.jlblNumCarrierImagePaths.setText(""+ alCarrierImagePaths_Panel.size());
			this.jlblNumCarrierImagePaths.setToolTipText("<html>("+ alCarrierImagePaths_Panel.size() + ") Carrier Image File(s) selected to embed Stego content <br><b>Max Images Allowed:</b> " + Drivers.maxNumOfCarrierFilePaths + "</html>");
			
			indicateTotalCarrierFileSize();
			
			return true;
		}
		catch(Exception e)
		{
			Drivers.eop("populateCarrierImagePaths", strMyClassName, e, e.getLocalizedMessage(), true);			
		}
		return false;
	}
	
	
	
	
	public boolean removeUploadDestinationAccountsRow(int rowToRemove)
	{
		try
		{
			
			if(this.alUploadDownload_DestinationPanels == null || this.alUploadDownload_DestinationPanels.size() < 2)
				return false;
			
			this.alUploadDownload_DestinationPanels.remove(rowToRemove);
						
			this.populateUploadDestinationAccounts();
			
			return true;
		}
		catch(Exception e)
		{
			Drivers.eop("removeUploadDestinationAccountsRow", strMyClassName, e, e.getLocalizedMessage(), true);
		}
		
		return false;
		
	}
	
	public boolean removeCarrierImagePath(int rowToRemove)
	{
		try
		{
			
			if(this.alCarrierImagePaths_Panel == null || this.alCarrierImagePaths_Panel.size() < 2)
				return false;
			
			this.alCarrierImagePaths_Panel.remove(rowToRemove);
						
			this.populateCarrierImagePaths();
			
			return true;
		}
		catch(Exception e)
		{
			Drivers.eop("removeCarrierImagePath", strMyClassName, e, e.getLocalizedMessage(), true);
		}
		
		return false;
		
	}
	
	
	public void sop(String s)
	{
		Drivers.sop(s);
	}

	
	@Override
	public void keyReleased(KeyEvent ke) 
	{
		if(ke.getSource() == this.jtxtpneSourceText)
		{
			if(jtxtpneSourceText.getText() != null)
				indicateSourceSize(jtxtpneSourceText.getText().trim().length());
		}
		
	}

	@Override
	public void keyTyped(KeyEvent ke) 
	{
		
		
	}
	
	public void keyPressed(KeyEvent ke)
	{
		
	}
	
	public void indicateSourceSize(long len)
	{
		jlblSourceFileSize.setText(Drivers.getFormattedFileSize_String(len));
		jlblSourceFileSize.setToolTipText("Source Image to Embed Content Size: " + len + " bytes");
		
	}
	
	public class ThreadProgress extends Thread implements Runnable
	{
		@Override
		public void run()
		{
			for (int i=0; i<=100; i++)
			{ 
				jprogressBar.setValue(i); 
				jprogressBar.repaint(); 
				jprogressBar.validate();

				try{Thread.sleep(15);} //wait b/4 incrementing again

				catch (InterruptedException err){}
				catch (Exception e){}
				
				if(i == 100)
					i = 0;
				
				if(jProgressBarVisible && !jprogressBar.isVisible())
				{
					jprogressBar.setVisible(jProgressBarVisible);
					validate();
				}
				else if(!jProgressBarVisible && jprogressBar.isVisible())
				{
					jprogressBar.setVisible(jProgressBarVisible);
					validate();
				}
			}
		}


	}
	
	public static void showProgressBar(boolean isVisible)
	{
		try
		{
			StegoFileSelection.jProgressBarVisible = isVisible;
			
			
		}
		catch(Exception e)
		{
			Drivers.eop("showProgressBar", "StegoFileSelection", e, e.getLocalizedMessage(), true);
		}
		
	}
	
	
	public static boolean setSourceText(byte [] arrTrueContents, String strToSet)
	{
		
		try
		{
			Drivers.setTextToJTextPane(StegoFileSelection.jtxtpneSourceText, strToSet);
			
			return true;
		}
		
		catch(Exception e)
		{
			Drivers.eop("setSourceText", StegoFileSelection.strMyClassName, e, e.getLocalizedMessage(), true);
		}
		
		return false;
		
	}
	
	public boolean ae_jbtnSaveSourceTextToDisk(/*think about having a static byte array (sourceTextToPasteIn_JTxtPneSourceText) to modify when ever we have the string val to set, therefore we can always write out the data in the pure raw form instead of dealing with the string conversions */)
	{
		try
		{
			if(this.jtxtpneSourceText.getText() == null || this.jtxtpneSourceText.getText().trim().equals(""))
			{
				Drivers.jop_Error("No Source Data to Save", "No Source Text");
				return false;
			}
			
			File flePath = Drivers.querySelectFile(false, "Save As...", JFileChooser.FILES_ONLY, false, false);
						
			if(flePath != null)
			{
				if(flePath.exists())
				{
					int selection = Drivers.jop_Confirm(flePath.getCanonicalPath() + " already exists.  \n\nDo you wish to save over it?", "Confirm Save over file");
					
					if(selection == JFileChooser.CANCEL_OPTION)//user chose not to save over file						
					{
						return false;
					}
				}
				
				if(!flePath.getCanonicalPath().contains("."))
				{
					flePath = new File(flePath.getCanonicalPath() + ".txt");
				}
				return Drivers.writeSourceTextToDisk(this.jtxtpneSourceText.getDocument().getText(0, (this.jtxtpneSourceText.getDocument().getLength())), flePath);
			}
			
			return true;
		}
		catch(Exception e)
		{
			Drivers.eop(" ae_btnSaveSourceTextToDisk", strMyClassName, e, e.getLocalizedMessage(), true);
		}
		
		return false;
	}
}