Hi there!

I am working on a program for my school. I am trying to have a JLabel in one class and run it in another class because I am trying to display and array. Part of my program is posted below. Can someone tell me or show me how to do this? Thank you!

Java Code:
Author: Ben Hartnett
Sources: Java: A Beginner's Guide
Source 2: Monster example posted on student forums
Date Retrieved: 1-26-2012

import java.awt.FlowLayout;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.SwingConstants;

public class InventoryAdvanced extends JFrame {

		//Create the GUI
		private JLabel label1;

		//Add JLabels to JFrame

		public InventoryAdvanced()
			super( "JLabel" );
			setLayout( new FlowLayout() );

			label1 = new JLabel("", array);
			add( label1 );
Java Code:
import javax.swing.JFrame;

public class GUIRun {

    public static void main(String[] args)
        InventoryAdvanced inventory = new InventoryAdvanced();

       	//Define the calculation variables
		double c1;
		double c2;
		double c3;

		//Declare the calculation variables
		c1 = 13.00;
		c2 = 5.00;
		c3 = 10.00;

		//Declare the 5% restocking fee
		double fee = .05;
		double cost;
		cost = 130.00;

		//Create the objects
		InventoryDefine swordstone = new InventoryDefine("Sword In The Stone Movie", 1, 10, 13.00, 130.00);
		InventoryDefine hercules = new InventoryDefine("Hercules Movie", 2, 20, 5.00, 100.00);
		InventoryDefine mermaid = new InventoryDefine("The Little Mermaid Movie", 3, 30, 10.00, 300.00);
        InventorySort sortThis = new InventorySort();
		InventoryCal cal = new InventoryCal();
		SwordStone movie = new SwordStone();

		//Use an object to store the array
   		InventoryDefine[] inventoryArray = new InventoryDefine[3];

		//Declare the arrays
   		inventoryArray[0] = swordstone;
   		inventoryArray[1] = hercules;
   		inventoryArray[2] = mermaid;


   		/*//Call the method from the sortThis object

		//Call the method from InventoryCal
		cal.calVar(c1, c2, c3);

		//Override the method from InventoryInherit
		movie.calVar(cost, fee); */