Java files/mainFrame.java
private void checkForUpdates(Priority p) {
		Component[] list = itemsPanel.getComponents();
		
		for (int i = 0; i < itemsPanel.getComponentCount(); i++) {
			if ((list[i].getClass().getName().toString().equals("PriceItem") && (((PriceItem) list[i]).getPriority() == p))){
				((PriceItem) list[i]).updatePrice();
			}
		}
		
		itemsPanel.repaint();
		revalidate();
	}
//update all items in the list
update all items in the list
update all items in the list
private void checkForUpdates(Priority p) {
		Component[] list = itemsPanel.getComponents();
		for (int i = 0; i < itemsPanel.getComponentCount(); i++) {
			if ((list[i].getClass().getName().toString().equals("PriceItem") && (((PriceItem) list[i]).getPriority() == p))){
				((PriceItem) list[i]).updatePrice();
			}
		}
		itemsPanel.repaint();
		revalidate();
	}
private void checkForUpdates ( Priority p ) { Component [ ] list = itemsPanel . getComponents ( ) ; for ( int i = 0 ; i < itemsPanel . getComponentCount ( ) ; i ++ ) { if ( ( list [ i ] . getClass ( ) . getName ( ) . toString ( ) . equals ( "PriceItem" ) && ( ( ( PriceItem ) list [ i ] ) . getPriority ( ) == p ) ) ) { ( ( PriceItem ) list [ i ] ) . updatePrice ( ) ; } } itemsPanel . repaint ( ) ; revalidate ( ) ; }
update all items in the list
update all items in the list