public void populatePackage(int id)
	{
		System.out.println("Getting data from database-50"); //display error msg
		
		NumberFormat defaultFormat = NumberFormat.getCurrencyInstance();
		DateFormat df = new SimpleDateFormat("dd/MM/yy");
		
		try
		{
			// Update the combo box.
			ComboBoxModel cbProdIDModel = new DefaultComboBoxModel(getPackageIDs());
			cbPackage.setModel(cbProdIDModel);
			
			// Select the input package.
			for (int i = 0; i < cbPackage.getItemCount(); i++) {
				int nItem = Integer.parseInt(cbPackage.getItemAt(i).toString().substring(0,cbPackage.getItemAt(i).toString().indexOf(" ")));
				if (nItem == id) {
					cbPackage.setSelectedIndex(i);
					break;
				}
			}
			
			// Get the package details.
			rs = stmt.executeQuery("SELECT * FROM packages where PackageID =" + id); 
			if (rs.next())
			{
				txtPkgNm.setText(rs.getString(2));
				
				String Sdate = df.format(rs.getDate(3));
				txtPkgSdate.setText(Sdate);
				
				String Edate = df.format(rs.getDate(4));
				txtPkgEdate.setText(Edate);
				
				txtPkgDesc.setText(rs.getString(5));
				
				double baseprice = Double.parseDouble(rs.getString(6));  
				txtPkgBasePri.setText(defaultFormat.format(baseprice ));
				
				double Agencycomm = Double.parseDouble(rs.getString(7));
				txtPkgAgyCom.setText(defaultFormat.format(Agencycomm));
				
				// Update the product supplier list.
				updateProdSuppList();	
			}
			else
			{
				System.out.println("No rows returned");
			}
			
			rs.close();
		}
		catch(SQLException e)
		{
			e.printStackTrace();
		}
	}