Java files/mainFrame.java
@SuppressWarnings("unchecked")
	private void loadItems() {
		ArrayList<Object> list2 = null;
		PriceItemSerializable  itemS= null;
		PriceItem pItem = null;
		
		try {
			
			File f = new File("Items.Data");
			if (!f.exists()) {
				f.createNewFile();
			}
			
			FileInputStream fIn = new FileInputStream("Items.data");
			ObjectInputStream oIn = new ObjectInputStream(fIn);
			
			list2 = (ArrayList<Object>) oIn.readObject();
			
			oIn.close();
			fIn.close();
			
		} catch (Exception e) {
			e.printStackTrace();
		}	
		
		if (list2 != null) {
			for (int i = 0; i < list2.size(); i++) {
				//need to convert the serializable items to PriceItem items
				itemS = (PriceItemSerializable)list2.get(i);
				pItem = new PriceItem(itemS.priority, this, itemS.html, itemS.itemName, itemS.originalPrice, itemS.notificationPrice, itemS.url, itemS.look, added);
				addItem(pItem);
				//addItem
			}
		}
	}
//load items from a saved file - persistent items
load items from a saved file - persistent items
load items from a saved file - persistent items
@SuppressWarnings("unchecked")
	private void loadItems() {
		ArrayList<Object> list2 = null;
		PriceItemSerializable  itemS= null;
		PriceItem pItem = null;
		try {
			File f = new File("Items.Data");
			if (!f.exists()) {
				f.createNewFile();
			}
			FileInputStream fIn = new FileInputStream("Items.data");
			ObjectInputStream oIn = new ObjectInputStream(fIn);
			list2 = (ArrayList<Object>) oIn.readObject();
			oIn.close();
			fIn.close();
		} catch (Exception e) {
			e.printStackTrace();
		}	
		if (list2 != null) {
			for (int i = 0; i < list2.size(); i++) {
				itemS = (PriceItemSerializable)list2.get(i);
				pItem = new PriceItem(itemS.priority, this, itemS.html, itemS.itemName, itemS.originalPrice, itemS.notificationPrice, itemS.url, itemS.look, added);
				addItem(pItem);
			}
		}
	}
@ SuppressWarnings ( "unchecked" ) private void loadItems ( ) { ArrayList < Object > list2 = null ; PriceItemSerializable itemS = null ; PriceItem pItem = null ; try { File f = new File ( "Items.Data" ) ; if ( ! f . exists ( ) ) { f . createNewFile ( ) ; } FileInputStream fIn = new FileInputStream ( "Items.data" ) ; ObjectInputStream oIn = new ObjectInputStream ( fIn ) ; list2 = ( ArrayList < Object > ) oIn . readObject ( ) ; oIn . close ( ) ; fIn . close ( ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; } if ( list2 != null ) { for ( int i = 0 ; i < list2 . size ( ) ; i ++ ) { itemS = ( PriceItemSerializable ) list2 . get ( i ) ; pItem = new PriceItem ( itemS . priority , this , itemS . html , itemS . itemName , itemS . originalPrice , itemS . notificationPrice , itemS . url , itemS . look , added ) ; addItem ( pItem ) ; } } }
load items from a saved file - persistent items
load items from a saved file - persistent items
//need to convert the serializable items to PriceItem items //addItem