private boolean isDataValid(String itemName, String category, String costString, String priceString,
			String dateString, String rateString) {
		if (itemName.trim().equals(DEFAULT_ITEM)) {
			JOptionPane.showMessageDialog(null,
					"Please select an Item from the list or create a new one by typing on the listbox.",
					"Invalid Item Name", JOptionPane.INFORMATION_MESSAGE);
			itemNameCB.requestFocus();
			return false;
		}
		if (category.trim().equals(DEFAULT_CATEGORY)) {
			JOptionPane.showMessageDialog(null,
					"Please select a Category from the list or create a new one by typing on the listbox.",
					"Invalid Category", JOptionPane.INFORMATION_MESSAGE);
			categoryCB.requestFocus();
			return false;
		}
		// parse rate
		try {
			Float rate = Float.parseFloat(rateString);
			if (rate < 0) {
				JOptionPane.showMessageDialog(null, "Rate should be a positive value. eg. 2.50", "Invalid Rate",
						JOptionPane.INFORMATION_MESSAGE);
				rateTF.requestFocus();
				return false;
			}
		} catch (NumberFormatException ne) {
			JOptionPane.showMessageDialog(null, "Please enter a proper value for Rate. eg. 2.50", "Invalid Rate",
					JOptionPane.INFORMATION_MESSAGE);
			rateTF.requestFocus();
			return false;
		}
		// parse date
		try {
			new SimpleDateFormat(ConfigValues.UI_DATE_FORMAT.toString()).parse(dateString);
		} catch (ParseException e) {
			JOptionPane.showMessageDialog(null, "The date entered is invalid. Please select from the calender button.",
					"Invalid Date", JOptionPane.INFORMATION_MESSAGE);
			dateTF.requestFocus();
			return false;
		}

		// parse cost
		try {
			Float cost = Float.parseFloat(costString);
			if (cost < 0) {
				JOptionPane.showMessageDialog(null, "Actual Cost should be a positive value. eg. 250.99",
						"Invalid Actual Cost", JOptionPane.INFORMATION_MESSAGE);
				costTF.requestFocus();
				return false;
			}
		} catch (NumberFormatException ne) {
			JOptionPane.showMessageDialog(null, "Please enter a proper value for Actual Cost. eg. 250.99",
					"Invalid Actual Cost", JOptionPane.INFORMATION_MESSAGE);
			costTF.requestFocus();
			return false;
		}

		// parse price
		try {
			Float price = Float.parseFloat(priceString);
			if (price < 0) {
				JOptionPane.showMessageDialog(null, "Selling Price should be a positive value. eg. 250.99",
						"Invalid Selling Price", JOptionPane.INFORMATION_MESSAGE);
				priceTF.requestFocus();
				return false;
			}
		} catch (NumberFormatException ne) {
			JOptionPane.showMessageDialog(null, "Please enter a proper value for Selling Price. eg. 250.99",
					"Invalid Selling Price", JOptionPane.INFORMATION_MESSAGE);
			priceTF.requestFocus();
			return false;
		}
		return true;
	}