Array keeps printing out null

I have an array that continues to print out null but when I trace it exactly after I store it, it stores what I want it to store. "White Bread"
Here is where the errors at:
int orderNum = 0;
               while(orderNum < cartItems)
                    printItems = "<html>" + printItems + "<br>1" + itemNameStrings[orderNum] + "</html>";
                    System.out.println(printItems);//Trace
                    System.out.println(cartItems);//Trace
                    System.out.println(orderNum);//Trace
                    System.out.println(itemNameStrings[orderNum]);//Trace
                    orderNum++;
               }And here is the whole project:
import java.io.*;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.util.*;
import javax.swing.border.*;
import java.text.*;
public class AdrianP1 implements ActionListener
     //---------------GLOBAL DECLARING------------------
     DecimalFormat Currency = new DecimalFormat("#0.00 dollars");//Currency
     //Changing Variables (void)
     String printItems = "Items";
     int arraySize = 2;
     String[] itemNameStrings;
     boolean first = true;
     boolean order = false;
     String itemName = "Error";
     double itemCost = 0.00;
     int cartItems = 0;
     //Main Frames
     final JFrame frame = new JFrame("Subway Sandwich Store");
     JFrame mainFrame = new JFrame("Subway Sandwich Store | Welcome");
     JFrame menuFrame = new JFrame("Subway Sandwich Store | Main Menu");
     JFrame instrucFrame = new JFrame("Subway Sandwich Store | Instructions");
     JFrame playFrame = new JFrame("Subway Sandwich Store | Play Game");
     JFrame breadFrame = new JFrame("Subway Sandwich Store | Order Bread");
     JFrame toppingFrame = new JFrame("Subway Sandwich Store | Order Toppings");
     JFrame condimentFrame = new JFrame("Subway Sandwich Store | Order Condiments");
     JFrame confirmFrame = new JFrame("Subway Sandwich Store | Confirm Your Order");
     JFrame cartFrame = new JFrame("Subway Sandwich Store | Your Cart");
     //---Main Buttons---
     final JButton mainMenuButton = new JButton("Main Menu");
     final JButton mainMenuButton1 = new JButton("Main Menu");
     final JButton mainMenuButton2 = new JButton("Main Menu");
     final JButton mainMenuButton3 = new JButton("Main Menu");
     final JButton goBackButton = new JButton("Go back");
     final JButton goBackButton1 = new JButton("Go back");
     final JButton goBackButton2 = new JButton("Go back");
     final JButton goBackButton3 = new JButton("Go back");
     final JButton goBackButton4 = new JButton("Go back");
     final JButton playButton1 = new JButton("Order Now!");
     final JButton playButton2 = new JButton("Order Now!");
     final JButton instrucButton = new JButton("Instructions");
     final JButton exitButton = new JButton("Exit");
     //---Play Buttons---     
     final JButton checkButton = new JButton("Check Out");
     final JButton checkButton1 = new JButton("Check Out");
     final JButton cartButton = new JButton("Cart (" + cartItems + ")");
     final JButton breadButton = new JButton("Bread");
     final JButton toppingsButton = new JButton("Toppings");
     final JButton condimentsButton = new JButton("Condiments");
     //-------Bread------
     double bwCost = 0.50, bwlCost = 0.50, biCost = 0.75, bhCost = 0.50;
     boolean whiteB = false, wholeB = false, italB = false, harvestB = false;
     final JButton whiteBreadButton = new JButton("Order White");
     final JButton wholeBreadButton = new JButton("Order Wheat");
     final JButton italianBreadButton = new JButton("Order Italian");
     final JButton harvestBreadButton = new JButton("Oder Harvest");
     //-----Toppings-----
     JButton orderTopButton = new JButton("Order the Selected Topping");
     JLabel pictureTop;
     JComboBox toppingList;
     //----Condiments----
     final JButton ketchupButton = new JButton("Order Ketchup");
     final JButton mustardButton = new JButton("Order Mustard");
     final JButton relishButton = new JButton("Order Relish");
     //-----Confirm------
     final JLabel confirmTextLabel;
     final JButton acceptButton = new JButton("Accept");
     final JButton declineButton = new JButton("Decline");
     //----Cart Screen---
     final JLabel cartItemLabel = new JLabel("<html><u>Items</u><br>No Items.</html>", JLabel.LEFT);
     final JLabel cartPriceLabel = new JLabel("<html><u>Price</u><br>No Items.</html>");
     //-------------END GLOBAL DECLARING-----------------     
     //ActionPerformed Method
     public void actionPerformed(ActionEvent event)
          if(event.getSource()==mainMenuButton || event.getSource()==mainMenuButton1 || event.getSource()==mainMenuButton2 || event.getSource()==mainMenuButton3)
               playFrame.setVisible(false);
               mainFrame.setVisible(false);
               instrucFrame.setVisible(false);
               menuFrame.setVisible(true);
          if(event.getSource()==goBackButton || event.getSource()==goBackButton1 || event.getSource()==goBackButton2 || event.getSource()==goBackButton3 || event.getSource()==goBackButton4)
               cartFrame.setVisible(false);
               confirmFrame.setVisible(false);
               condimentFrame.setVisible(false);
               toppingFrame.setVisible(false);
               breadFrame.setVisible(false);
               instrucFrame.setVisible(false);
               playFrame.setVisible(true);
          if(event.getSource()==instrucButton)
               menuFrame.setVisible(false);
               instrucFrame.setVisible(true);
          if(event.getSource()==playButton1 || event.getSource()==playButton2)
               instrucFrame.setVisible(false);
               menuFrame.setVisible(false);
               playFrame.setVisible(true);
          if(event.getSource()==breadButton)
               playFrame.setVisible(false);
               menuFrame.setVisible(false);
               breadFrame.setVisible(true);
          if(event.getSource()==toppingsButton)
               playFrame.setVisible(false);
               toppingFrame.setVisible(true);
          if(event.getSource()==condimentsButton)
               playFrame.setVisible(false);
               condimentFrame.setVisible(true);
          if(event.getSource()==acceptButton)
               ++arraySize;
               itemNameStrings = new String[arraySize];
               itemNameStrings[cartItems] = itemName;
               System.out.println(itemNameStrings[cartItems]);
               cartItems++;
               cartButton.setText("Cart (" + cartItems + ")");
               confirmFrame.setVisible(false);
               playFrame.setVisible(true);
          if(event.getSource()==declineButton)
               confirmFrame.setVisible(false);
               playFrame.setVisible(true);
          if(event.getSource()==cartButton)
               int orderNum = 0;
               while(orderNum < cartItems)
                    printItems = "<html>" + printItems + "<br>1" + itemNameStrings[orderNum] + "</html>";
                    System.out.println(printItems);//Trace
                    System.out.println(cartItems);//Trace
                    System.out.println(orderNum);//Trace
                    System.out.println(itemNameStrings[orderNum]);//Trace
                    orderNum++;
               cartItemLabel.setText(printItems);
               System.out.println(printItems);
               playFrame.setVisible(false);
               cartFrame.setVisible(true);
          if(order==true)
               if(event.getSource()==whiteBreadButton)
                    whiteB = true;
                    itemName = "White Bread";
                    itemCost = bwCost;
                    confirmTextLabel.setText("<html>Would you like to purchase <u>" + itemName + "</u> <br>for a cost of <u>$" + Currency.format(itemCost) + "</u>?</html>");
                    breadFrame.setVisible(false);
                    confirmFrame.setVisible(true);
               if(event.getSource()==wholeBreadButton)
                    wholeB = true;
                    confirmFrame.setVisible(true);
               if(event.getSource()==italianBreadButton)
                    italB = true;
                    confirmFrame.setVisible(true);
               if(event.getSource()==harvestBreadButton)
                    harvestB = true;
                    confirmFrame.setVisible(true);
          if(event.getSource()==exitButton)
               System.exit(0);
          if(event.getSource()==toppingList)
               JComboBox cb = (JComboBox)event.getSource();
             String toppingName = (String)cb.getSelectedItem();
             updateLabel(toppingName);
     //Main Method   
    public static void main(String[] args) throws Exception
         new AdrianP1();         
    //Constructive and Starting Method
    AdrianP1()
         //--------------------------Action Listeners----------------------------------
         //Creates all action listeners
         mainMenuButton.addActionListener(this);
         mainMenuButton1.addActionListener(this);
         mainMenuButton2.addActionListener(this);
         mainMenuButton3.addActionListener(this);
         goBackButton.addActionListener(this);
         goBackButton1.addActionListener(this);
         goBackButton2.addActionListener(this);
         goBackButton3.addActionListener(this);
         goBackButton4.addActionListener(this);
         exitButton.addActionListener(this);
          instrucButton.addActionListener(this);
          playButton1.addActionListener(this);
          playButton2.addActionListener(this);
          breadButton.addActionListener(this);
          toppingsButton.addActionListener(this);
          condimentsButton.addActionListener(this);
          //Bread buttons
          whiteBreadButton.addActionListener(this);
          //Final buttons
          cartButton.addActionListener(this);
          acceptButton.addActionListener(this);
          declineButton.addActionListener(this);
          //--------------------------Splash Screen----------------------------------
         //Declaring
         order = false;
         final ImageIcon welcomePic = new ImageIcon("welcome.jpg");
         final JPanel sMainPanel = new JPanel(new BorderLayout());
         final JPanel sTopPanel = new JPanel(new BorderLayout());  
         final JPanel sButtonPanel = new JPanel(new FlowLayout ());
         final JLabel sTextLabel = new JLabel("Please click the button below", JLabel.CENTER);     
         final JLabel label = new JLabel("Subway Sandwich Store");
         final JLabel welcomeLPic = new JLabel(welcomePic);
          sTopPanel.add(welcomeLPic , BorderLayout.NORTH);
          sTopPanel.add(sTextLabel);
          sButtonPanel.add(mainMenuButton1);
          sMainPanel.add(sTopPanel , BorderLayout.CENTER);
          sMainPanel.add(sButtonPanel , BorderLayout.SOUTH);
             mainFrame.setContentPane(sMainPanel);
         mainFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
         mainFrame.pack();
         mainFrame.setVisible(true);
         mainFrame.setSize(350,390);
          //--------------------------Main Menu----------------------------------
          //Declaring
          order = false;
          final ImageIcon mainMenuImage = new ImageIcon("mainMenuImage.jpg");
          final JPanel mMainPanel = new JPanel(new BorderLayout());
          final JPanel mTopPanel = new JPanel(new BorderLayout());
          final JPanel mButtonPanel = new JPanel(new FlowLayout());
          final JLabel imageLabel = new JLabel(mainMenuImage);
          final JLabel textLabel = new JLabel("Please click a button", JLabel.CENTER);
          mTopPanel.add(imageLabel , BorderLayout.NORTH);
          mTopPanel.add(textLabel , BorderLayout.CENTER);
          mButtonPanel.add(playButton1);
          mButtonPanel.add(instrucButton);
          mButtonPanel.add(exitButton);
          mMainPanel.add(mTopPanel, BorderLayout.CENTER);
          mMainPanel.add(mButtonPanel, BorderLayout.SOUTH);
             menuFrame.setContentPane(mMainPanel);
         menuFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
         menuFrame.pack();
         menuFrame.setVisible(false);
         menuFrame.setSize(350,390);
          //--------------------------Instructions----------------------------------
          //Declaring
          order = false;
          final JPanel iTopPanel = new JPanel(new BorderLayout());
          final JPanel iButtonPanel = new JPanel(new FlowLayout());
          final JPanel iMainPanel = new JPanel(new BorderLayout());
          final JLabel iTextLabel = new JLabel("Instructions go HRER!", JLabel.CENTER);
          iTopPanel.add(iTextLabel);
          iButtonPanel.add(mainMenuButton3);
          iButtonPanel.add(playButton2);
          iMainPanel.add(iTopPanel, BorderLayout.CENTER);
          iMainPanel.add(iButtonPanel, BorderLayout.SOUTH);
          iTopPanel.setBorder(BorderFactory.createTitledBorder("Instructions"));
          instrucFrame.setContentPane(iMainPanel);
         instrucFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
         instrucFrame.pack();
         instrucFrame.setVisible(false);
         instrucFrame.setSize(350,390);
          //--------------------------Play Game----------------------------------
          //Declaring
          order = false;
          final ImageIcon playImage = new ImageIcon("playGameImage.jpg");
          final JPanel pTopPanel = new JPanel(new BorderLayout());
          final JPanel pInstrucPanel = new JPanel(new FlowLayout());
          final JPanel pButtonPanel = new JPanel(new FlowLayout());
          final JPanel pButton1Panel = new JPanel(new FlowLayout());
          final JPanel pButton2Panel = new JPanel(new FlowLayout());
          final JPanel pMainPanel = new JPanel(new BorderLayout());
          final JLabel pImageLabel = new JLabel(playImage);
          final JLabel pTextLabel = new JLabel("Click below to customize your sandwich; or check out", JLabel.CENTER);
          pTopPanel.add(pButton2Panel, BorderLayout.NORTH);
          pTopPanel.add(pImageLabel, BorderLayout.CENTER);
          pInstrucPanel.add(pTextLabel, BorderLayout.SOUTH);
          pButton1Panel.add(breadButton);
          pButton1Panel.add(toppingsButton);
          pButton1Panel.add(condimentsButton);
          pButton2Panel.add(checkButton);
          pButton2Panel.add(cartButton);
          pButton2Panel.add(mainMenuButton2);
          pButtonPanel.add(pButton1Panel);
          pMainPanel.add(pTopPanel, BorderLayout.NORTH);
          pMainPanel.add(pInstrucPanel, BorderLayout.CENTER);
          pMainPanel.add(pButtonPanel, BorderLayout.SOUTH);
          pInstrucPanel.setBorder(BorderFactory.createTitledBorder("Instructions"));
          playFrame.setContentPane(pMainPanel);
         playFrame.setDefaultCloseOperation(playFrame.EXIT_ON_CLOSE);
         playFrame.pack();
         playFrame.setVisible(false);
         playFrame.setSize(350,390);
          //--------------------------Order Bread----------------------------------
          //Declaring
          order = true;
          final ImageIcon whiteBImage = new ImageIcon("whiteB.jpg");
          final ImageIcon wheatBImage = new ImageIcon("wheatB.jpg");
          final ImageIcon italianBImage = new ImageIcon("italianB.jpg");
          final ImageIcon harvestBImage = new ImageIcon("harvestB.jpg");
          final JPanel bTopPanel = new JPanel(new GridLayout(0,2));
          final JPanel bCenterPanel = new JPanel(new FlowLayout());
          final JPanel bButtonPanel = new JPanel(new FlowLayout());
          final JPanel bMainPanel = new JPanel(new BorderLayout());
          final JLabel whiteBLabel = new JLabel(whiteBImage);
          final JLabel wheatBLabel = new JLabel(wheatBImage);
          final JLabel italianBLabel = new JLabel(italianBImage);
          final JLabel harvestBLabel = new JLabel(harvestBImage);
          final JLabel bInstrucTextLabel = new JLabel("Please click the button below a bread to choose", JLabel.CENTER);
          bTopPanel.add(whiteBLabel);
          bTopPanel.add(wheatBLabel);
          bTopPanel.add(whiteBreadButton);
          bTopPanel.add(wholeBreadButton);
          bTopPanel.add(italianBLabel);
          bTopPanel.add(harvestBLabel);
          bTopPanel.add(italianBreadButton);
          bTopPanel.add(harvestBreadButton);
          bCenterPanel.add(bInstrucTextLabel);
          bButtonPanel.add(goBackButton1);
          bMainPanel.add(bTopPanel, BorderLayout.NORTH);
          bMainPanel.add(bCenterPanel, BorderLayout.CENTER);
          bMainPanel.add(bButtonPanel, BorderLayout.SOUTH);
          bTopPanel.setPreferredSize(new Dimension(200, 270));
          bTopPanel.setMinimumSize(new Dimension(200,270));
          bTopPanel.setMaximumSize(new Dimension(200,270));
          bCenterPanel.setBorder(BorderFactory.createTitledBorder("Instructions"));
          breadFrame.setContentPane(bMainPanel);
         breadFrame.setDefaultCloseOperation(breadFrame.EXIT_ON_CLOSE);
         breadFrame.pack();
         breadFrame.setVisible(false);
         breadFrame.setSize(350,390);
         //--------------------------Order Toppings----------------------------------
          //Declaring
          order = true;
          final JPanel tTopPanel = new JPanel(new FlowLayout());
          final JPanel tCenterPanel = new JPanel(new FlowLayout());
          final JPanel tActionPanel = new JPanel(new BorderLayout());
          final JPanel tButtonPanel = new JPanel(new FlowLayout());
          final JPanel tMainPanel = new JPanel(new BorderLayout());
          final JLabel tInstrucTextLabel = new JLabel("<html>Please select a topping from the drop down list above<br> and then click order</html>");
          //Creates list of toppings - file paths must match name
          String[] toppingStrings = { "Olives", "Tomatoes", "Lettuce", "Turkey", "Ham", "Select a Topping"};
          pictureTop = new JLabel();
          //Selects item at index 5
          toppingList = new JComboBox(toppingStrings);
          toppingList.setSelectedIndex(5);
          tActionPanel.add(toppingList , BorderLayout.NORTH);
          tActionPanel.add(pictureTop , BorderLayout.CENTER);
          tActionPanel.add(orderTopButton , BorderLayout.SOUTH);
          tCenterPanel.add(tInstrucTextLabel);
          tButtonPanel.add(goBackButton2);
          tMainPanel.add(tActionPanel , BorderLayout.NORTH);
          tMainPanel.add(tCenterPanel , BorderLayout.CENTER);
          tMainPanel.add(tButtonPanel , BorderLayout.SOUTH);
          //Must go in this method, do not put in main
          toppingList.addActionListener(this);
        pictureTop.setFont(pictureTop.getFont().deriveFont(Font.ITALIC));
        pictureTop.setHorizontalAlignment(JLabel.CENTER);
        updateLabel(toppingStrings[toppingList.getSelectedIndex()]);
        pictureTop.setBorder(BorderFactory.createEmptyBorder(10,0,0,0));
        //Preferred size - widest image and the height of the tallest image
        pictureTop.setPreferredSize(new Dimension(177, 132));
        tCenterPanel.setBorder(BorderFactory.createTitledBorder("Instructions"));
          toppingFrame.setContentPane(tMainPanel);
         toppingFrame.setDefaultCloseOperation(toppingFrame.EXIT_ON_CLOSE);
         toppingFrame.pack();
         toppingFrame.setVisible(false);
         toppingFrame.setSize(350,390);
          //--------------------------Order Condiments----------------------------------
          //Declaring
          order = true;
          final ImageIcon condimentsImage = new ImageIcon("condiments.gif");
          final JPanel cTopPanel = new JPanel(new FlowLayout());
          final JPanel cCenterPanel = new JPanel(new FlowLayout());
          final JPanel cButtonPanel = new JPanel(new BorderLayout());
          final JPanel cMainPanel = new JPanel(new BorderLayout());
          final JLabel cInstrucTextLabel = new JLabel("<html>Please select a button below to order a Condiment</html>", JLabel.CENTER);
          final JLabel condimentsLabel = new JLabel(condimentsImage);
          cTopPanel.add(goBackButton3);
          cTopPanel.add(condimentsLabel);
          cCenterPanel.add(cInstrucTextLabel);
          cButtonPanel.add(mustardButton , BorderLayout.WEST);
          cButtonPanel.add(ketchupButton , BorderLayout.CENTER);
          cButtonPanel.add(relishButton , BorderLayout.EAST);
          cMainPanel.add(cTopPanel , BorderLayout.NORTH);
          cMainPanel.add(cCenterPanel , BorderLayout.CENTER);
          cMainPanel.add(cButtonPanel , BorderLayout.SOUTH);
          cCenterPanel.setBorder(BorderFactory.createTitledBorder("Instructions"));          
          condimentFrame.setContentPane(cMainPanel);
         condimentFrame.setDefaultCloseOperation(condimentFrame.EXIT_ON_CLOSE);
         condimentFrame.pack();
         condimentFrame.setVisible(false);
         condimentFrame.setSize(350,390);                    
          //--------------------------Confirmation Screen----------------------------------
          final JPanel coMainPanel = new JPanel(new BorderLayout());
          confirmTextLabel = new JLabel("<html>Would you like to purchase <u>" + itemName + "</u> <br>for a cost of <u>$" + Currency.format(itemCost) + "</u>?</html>", JLabel.CENTER);
          final JPanel coTopPanel = new JPanel(new FlowLayout());
          final JPanel coButtonPanel = new JPanel(new FlowLayout());
          final JPanel coCenterPanel = new JPanel(new FlowLayout());
          coTopPanel.add(goBackButton);
          coCenterPanel.add(confirmTextLabel);
          coButtonPanel.add(acceptButton);
          coButtonPanel.add(declineButton);
          coMainPanel.add(coTopPanel , BorderLayout.NORTH);
          coMainPanel.add(coCenterPanel , BorderLayout.CENTER);
          coMainPanel.add(coButtonPanel , BorderLayout.SOUTH);          
          coCenterPanel.setBorder(BorderFactory.createTitledBorder("Correct?"));     
          confirmFrame.setContentPane(coMainPanel);
         confirmFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
         confirmFrame.pack();
         confirmFrame.setVisible(false);
         confirmFrame.setSize(350,390);
         //------------------------------Cart Screen----------------------------------
          final JPanel caMainPanel = new JPanel(new BorderLayout());
          final JPanel cartRPanel = new JPanel(new BorderLayout());
          final JPanel caButtonPanel = new JPanel(new FlowLayout());
          final JPanel caCenterPanel = new JPanel(new FlowLayout());
          caCenterPanel.add(cartRPanel);
          cartRPanel.add(cartItemLabel , BorderLayout.WEST);
          cartRPanel.add(cartPriceLabel , BorderLayout.EAST);
          caButtonPanel.add(goBackButton4);
          caButtonPanel.add(checkButton1);
          caMainPanel.add(caCenterPanel , BorderLayout.CENTER);
          caMainPanel.add(caButtonPanel , BorderLayout.SOUTH);          
          //cartItemLabel.setAlignmentX(Component.LEFT_ALIGNMENT);
          //cartItemLabel.setHorizontalTextPosition(SwingConstants.LEFT);
          caCenterPanel.setBorder(BorderFactory.createTitledBorder("Your Items"));     
          cartFrame.setContentPane(caMainPanel);
         cartFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
         cartFrame.pack();
         cartFrame.setVisible(false);
         cartFrame.setSize(350,390);     
         //--------------------------End of Constructive Method---------------------------
     //Updates the label when combo box is changed
     protected void updateLabel(String name)
        ImageIcon icon = createImageIcon("images/" + name + ".jpg");
        //Sets the image of the icon
        pictureTop.setIcon(icon);
        if (icon != null)
            pictureTop.setText(null);
        else
            pictureTop.setText("Image not found");
    //Returns an ImageIcon, or null if the path was invalid to the icon
    protected static ImageIcon createImageIcon(String path)
        java.net.URL imgURL = AdrianP1.class.getResource(path);
        if (imgURL != null)
            return new ImageIcon(imgURL);
        else
             //Prints out if file is not found in system window
            System.out.println("Couldn't find file: " + path);
            return null;
     public void updateConfirm()
          //------------------NOT IN USE-------------------
          if(whiteB==true)
               itemName = "White Bread";
               itemCost = bwCost;
          if(wholeB==true)
          if(italB==true)
          if(harvestB==true)
          //------------------NOT IN USE-------------------
     public void receiptPrint ()
          //------------------NOT IN USE-------------------
          final JLabel receiptLabel = new JLabel("<html>Your PST:<br>Your GST:<br>Your Total:</html>");
          final JPanel receiptPanel = new JPanel(new FlowLayout());
          receiptPanel.add(receiptLabel);
          receiptLabel.setFont(new Font("Serif", Font.PLAIN, 15));
          receiptPanel.setBorder(BorderFactory.createTitledBorder("Your Receipt"));
          //------------------NOT IN USE-------------------
}

I'm certainly not going to read all of that, perhaps someone else here will.You really think so? I seriously doubt it.
@OP: Please go through these links:
[How to ask questions the smart way|http://catb.org/~esr/faqs/smart-questions.html]
SSCCE
db

Similar Messages

  • My photosmart C5280 keeps printing out blank photos

    Every time I try to print a colour photo on my Photosmart C5280 it comes out blank
    Jackser

    Hi @jackstrax,
    Welcome to the HP Forums!
    I understand that your HP Photosmart c5280 keeps printing blank photos. I am happy to help!
    Please see this post, Re: colour photos from my photosmart C5280 printer come out blank, by my colleague @Sunshyn2005.
    If the post does not resolve your issue, please call our phone support at 800-474-6836. If you live outside the US/Canada Region, please click the link below to get the support number for your region. Country-language selector.  
    Best of luck!
    RnRMusicMan
    I work on behalf of HP
    Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos Thumbs Up" to say “Thanks” for helping!

  • My A4 centred document keeps printing out off centre.

    I have an A4 Document which has everything centred, when i print out the document is off centre and I can't figure out why this is happening. I have tried exporting as pdf & jpgs and when i print those out they are off centre too. The actual InDesign document is aligned to the centre perfectly though!
    Help!

    I just want to be clear about what "the same direction" means. After rotation the same elements are too close to the same edge of the page.
    If that's true on all the prints, the problem is in the communication between ID and the printer (and that's not all that unusual with Ricoh printer drivers and ID). ID is not known for it's native printing, and it doesn't get along with some print drivers at all. Top of the list is HP, and Ricoh might be second. In such cases exporting PDF and printing from Acrobat is the suggested workaround. It disturbs me, though that you say the PDF also prints off center, which is why I think this is a printer problem.

  • My printer keeps printing out a file summary page every time I print something?!

    HP Photosmart Plus B210- Every time I print anything, the printer spits out a summary page of the file I'm printing...wasting paper and ink!  How do I get it to stop?!  I've already re-installed the software and that didn't work...

    Hi,
    Are you printing from Word ? If Yes, please try this:
    Click the 'Office Button' (top-left corner of the window) then 'Print'
    Click 'Options' (bottom-left corner of the print window)
    Choose the 'Display' section
    Untick 'Print document properties'
    Click OK to all the windows and you're done
    Regards.
    Source: http://www.wayne-robinson.com/journal/2008/1/24/stop-printing-document-properties-summary-page-in-wo...
    BH
    **Click the KUDOS thumb up on the left to say 'Thanks'**
    Make it easier for other people to find solutions by marking a Reply 'Accept as Solution' if it solves your problem.

  • Print out Forte Arrays

    Greetings All:
    I'd like to know if anyone has had any experience printing out
    Forte Arrays[screen tables] from the Forte Window it exists in.
    Example:
    A Forte window exists that contains Forte Arrays. I
    want an option to either select from the pulldown
    FILE menu or select a button which will automatically
    print out the contents of that Forte Array.
    Has anyone tried to resolve this kind of problem before?
    Regards,
    Antonio Mercado

    try this
    import java.io.*;
    import java.util.*;
    public class PrintE {
    public static void main (String [] args) {
    String line = null;
    String fname = null;
    Vector v=new Vector();
    try {
    System.out.println("Enter file for Entropy print out:");
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    fname = in.readLine();
    catch(IOException e){
    e.printStackTrace();
    try{
    String in= null;
    FileReader fr = new FileReader(fname);
    BufferedReader br = new BufferedReader(fr);
    while ((in = br.readLine()) !=null) {
    v.addElement(in);
    System.out.println(in); }
    catch(IOException e){
    e.printStackTrace();
    System.out.print("Enter line:");
    int index = Integer.parseInt(fname);
    System.out.println(.get(index -1)); //probs here
    assuming user enter say 4
    say
    index=4;
    then
    System.out.println(v.elementAt(index-1));
    hope this helps

  • Print out array to JTextArea

    Hello!
    I having trouble to print out the array to a JTextArea.
    This is an asignment so please do not spoonfeed me with code.
    To test that I have added elements correctly in my array I sat it up to print out in console, wich works fine.
    Please give me a hint on what I need to do in order to make it work. Below you see the code that is important for this part of the program.
    Part of my controller:
    //User press "Show Runners" button
              else if(user_action.equals("Show Runners")) {
                   //Call method in model class
                   model.showRunnersBy_startNR();
                   //Display (I will use this once I print out to JTextArea)
                   //view.setDisplayArea(""+model.showRunnersBy_startNR());
              }//End if statementPart of my model
    //showRunnersBY_startNR
         public void showRunnersBy_startNR() {
              for(int i = 0; i <store.getIndex_runner(); i++) {
                   System.out.println(store.global_runner.getRunners());     //Print out in console for now to see that the input and output is working correctly
    //I should have this as "public String showRunnersBy_startNR()" instead with a return statment, correct?
    //I tryed the above but did only manage to print out my latest input in the JTextArea
    Part of my view// Sets the text displayed on the display area
         public void setDisplayArea(String message){
              display.setText(""+message);

    Hello again!
    I see :)
    part of my model
         //showRunnersBY_startNR
         public void showRunnersBy_startNR() {
              for(int i = 0; i <store.getIndex_runner(); i++) {
                   view.setDisplayArea(store.global_runner.getRunners());     
              }part of my view     // Sets the text displayed on the display area
         public void setDisplayArea(String message){
              display.append(""+message+"\n");
         }SetText() seemed to only print out the last one added to the array, so I I used the "append" instead.
    Thanks for the hint.
    Regards
    Martin                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Print out array

    The code does not print out like it shoud. What am I doing wrong? Thank you for help
    public class test {
        public static void main(String ... args) {
            String text = "array";
            char[] textArray = text.toCharArray();
            System.out.println("     text >" + text);
            System.out.print("textArray >" + textArray);
    }output:
         text >array
    textArray >[C@addbf1

    Once again this is printing out correctly, to get your desired syntax you could loop through the array e.g
    public class test {   
       public static void main(String ... args) {
             String text = "array";
             char[] textArray = text.toCharArray();
             System.out.println("text > " + text);
             System.out.print("textArray > ");
             for(int i = 0;i<textArray.length;i++){
                 System.out.print(textArray);
    }Calypso                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Keep getting "out of paper" message, cannot print Photosmart 3150

    keep getting "out of paper" message even though tray is full. No paper jams, checked front and back doors. cannot print Photosmart 3150

    Please read this post then provide some details.  What printer model? What operating system? 
    Bob Headrick,  HP Expert
    I am not an employee of HP, I am a volunteer posting here on my own time.
    If your problem is solved please click the "Accept as Solution" button ------------V
    If my answer was helpful please click the "Thumbs Up" to say "Thank You"--V

  • Help!!! How do I print out a 2d Array?

    Say, I have
    static int[][] board = { {p,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r},
    {n,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r},
    {n,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r},
    {n,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r},
    {n,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r},
    {n,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r},
    {n,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r},
    {n,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r},
    {n,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r},
    {n,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r},
    {n,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r},
    {n,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r},
    {n,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r},
    {n,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r} };
    where,
    private static int w = 0; //Block
    private static int f = 1; //Movable Block
    private static int c = 2; //bomb
    private static int n = 3; //nothing
    private static int p = 4;
    private static int r =(int) Math.random()%4;
    How do I print out this 2 d array so it looks like
    Where all these stars are numbers...

    for (int i = 0; i < board.length; i ++)
    for (int j = 0; j < board.length; j ++)
    System.out.print (((j == 0) ? "" : ", ") + board[i][j]);
    System.out.println ();
    I think your random generator is not quite correct as the seed will always be the same causing you to have same random number. try to work that out...

  • HP photosmart 5520 my new printer on photo printing keeps stating out of paper

    my new HP photosmart 5520 will not print photos. It keeps flashing "out of paper, reload" when the printer is already loaded with paper single and several sheets. Is this a faulty machine that I bought or can it be rectified. I never had this problem with my previous Kodak printer. Could you please advise what can be done to remedy this or should I purchase another make of printer. Thanks Michael

    Hello shuter1,
    Welcome to the HP Support Forums!
    I see you are having photo printing issues with the Photosmart 5520, it will not feed the paper. Will the printer print on regular 8.5x11 paper?
    What is the paper type and size you are trying to print these photos on?
    See if following the steps outlined in this guide will help: Printing Photos Saved on Your Computer or Memory Card.
    I will look back for your reply.
    JERENDS
    I work on behalf of HP
    Please click “Accept as Solution” if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos Thumbs Up" to the left of the reply button to say “Thanks” for helping!

  • How to print out the position of 2 dimension arrays?

    there are 2 dimension arrays, how can print out the position of value than 4?
    for example
    0 2 3 2 2 2
    0 1 1 2 5 3
    1 2 3 3 2 1
    print out:
    The pos is ( 5,2).

    Hello
    If I understand your question correctly, you are trying to print out the indexes where the value in your matrix is greater than 4
    If this is the case, then what you need to use is nested for loops e.g.
    for (int i = 0; i< array[0].length; i++)
    for (int j = 0; j< array[].length; j++)
    int value = array[i][j];
    if (value > 4)
    System.out.println("The pos is (" + i + "," + j + ")" );
    Regarding the syntax I have used to get the size of the array, I am not sure if this is correct, but you should have an idea of what I am doing.
    Sajid

  • How can I print out an Array List in my GUI program?

    I have an ArrayList of Objects which I want to print out in a TextArea in my GUI. I tried using setText(), but it seems like that can only handle strings. Does anyone know of an alternative method or some other way to get around this?

    Ok, I have an object name Instrument which contains a double price, String name, int numberInStock. In my GUIFrame class which creates the GUI obviously, I have a button listener that should print out my ArrayList in a TextArea when clicked on a button.
    Here is the code:
    private class showIResponse implements ActionListener{
              public void actionPerformed(ActionEvent e){
                   showText.setText(parseString(ali));
    it is still giving me an error saying "cannot find symbol method parseString(java.util.ArrayList<java.lang.Object>)"

  • Laserjet 1505 connected to AEB 802.11n via USB keeps timing out after print

    I have a HP Laserjet 1505 connected on my AEB 802.11n via USB and shared on my network, on my network are two macs connected via wifi and 3 WinXP PC connected via wire. I have Bonjour and WinXP laserjet drivers installed on all Win PC. Everytime I print from any of the computers, it will print the first time, but when I try printing again from any of the machines, the macs and winxp pc's cannot detect the printer. When I go to airport utility, the printer cannot be detected anymore. I have to hard reset the AEB for it to detect the laserjet printer again. But the same thing happens again after I print out another document. Has anybody encountered this kind of problem. Can anyone help me resolve this?

    Here is what I got from HP support :
    The driver for the Laserjet P1006 is not available yet for Os 10.5...we are hoping it will be release in the next week or so...please click on the link below to sign up for an email update as soon as it is available..As a workaround, some people have been able to use the 10.4 driver from the cd, but this is not guaranteed to work in all applications therefore the only solution is to wait and install the 10.5 driver.
    So we wait.
    Yves

  • Keeps printing done...

    I know why this code keeps printing done, its one my for loops. Currently this code does percisily what I want it to with a few hiccups that will be fixed. The current problem is that it keeps printing done for each row or record it places in the csv file. I need it to print to the file and then when it is truly done - print done. Also this is really slow....there are 1500+ records to pull from the cdata section, convert to comma delaminated and then place into the csv. the ripping and converting takes seconds. the writing's to the file takes .....well i never let it finish, every time I press stop its up to the 600th record and that's after a couple minutes.
    I know I am missing something. I just need some eyes to look at it. its not the most efficient way to do this, I get that. All i care about right now is making it print done ONLY when it is truly DONE writing to the file - and it shouldn't take so long to write to a file. 600 records in 2 minutes? something is wrong.
    Code is bellow. - prepare for a long read.
    package xmlcsv;
    import java.io.File;
    import java.io.FileWriter;
    import java.util.StringTokenizer;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import org.w3c.dom.CDATASection;
    import org.w3c.dom.CharacterData;
    import org.w3c.dom.Document;
    import org.w3c.dom.Element;
    import org.w3c.dom.Node;
    import org.w3c.dom.NodeList;
    * Essentially we take a xml file, find its cdata section and then
    * process the information in there to then spit out to a csv file.
    public class XmlCSV {
          * We need to process the data in the Cdata section and spit it out in a csv file.
          * This is the "main" part of the program which is run.
          * @param args
         public static void main(String[] args) throws Exception
              File file = new File("Data.xml");
              DocumentBuilder db = DocumentBuilderFactory.newInstance().newDocumentBuilder();
              Document doc = db.parse(file);
              doc.getDocumentElement().normalize();
              NodeList nodes = doc.getElementsByTagName("TransmissionWrapper");
              for (int i = 0; i< nodes.getLength(); i++)
                   Element element = (Element) nodes.item(i);
                   NodeList cData = element.getElementsByTagName("TransmissionData");
                   Element line = (Element) cData.item(0);
                   //test
                   getInfo(getCData(line));
          * We want to get all the data out of the CData Section.
          * Pass it into the getInfo() method to then get the
          * the data which will be parsed and thrown into a csv file.
          * @param e
          * @return
         private static final String getCData(Element e)
              NodeList child = e.getChildNodes();
              if (child != null)
                   for (int i = 0; i< child.getLength(); i++)
                        Node childNode = child.item(i);
                        if (childNode.getNodeType() == Node.CDATA_SECTION_NODE)
                             CDATASection cdata = (CDATASection) childNode;
                             String data = cdata.getData();
                             return data;
              return "Theres nothing there";
          * We want to remove all pipes then replace all those pipes with commas
          * the simple .replace() does not work. so we pass all the data into a string array and
          * pass it to a method that reforms the data and replaces pipes with commas
          * TODO: I didn't realize some information is comma deliminated so we have:
          * CHEVROLET,COBALT which may pose a problem later.
          * @throws Exception
         private static final String getInfo(String str) throws Exception
              StringTokenizer st = new StringTokenizer(str.trim());
              while (st.hasMoreTokens())
                   String[] info = str.split("\\|", -1);
                   for(int i = 0; i<info.length; i++)
                        returnComma(info);
              return "Nothing to return";
          * We take the String array of data and reform it back into
          * a comma deliminated peice of data that we can then use with CSV
          * @param str
          * @return
          * @throws Exception
         private static final String returnComma(String[] str) throws Exception
              StringBuffer sb = new StringBuffer();
              for (int i =0; str != null && i < str.length; i++)
                   sb.append(str);
                   if(i < str.length - 1)
                        sb.append(",");
              writeToFile(sb.toString(), "data2.csv");
              return null;
         * Write the data to a csv file.
         * @param st
         * @param filename
         * @throws Exception
         private static final void writeToFile(String st, String filename) throws Exception
              FileWriter fw = new FileWriter(filename);
              fw.append(st);
              fw.flush();
              fw.close();
              System.out.println("done");

    The question(s) is: +"How do I make it write to the file and print done only when done?"+Move the print statement out of the loop?
    +"Why is it taking up to 5-10 minutes to write 600 records to a file when it takes 30 seconds to parse the pipes, and put commas in and spit it out to the page"?+Because you are writing to the file every time you call returnComma(), and you are calling returnComma() lots of times. Most probably your entire file writing scheme is up the pole. You can't really want the file just to contain whatever the last invocation of returnComma() printed, and if you do why do all the preceding writes at all?
    Also returnComma() doesn't return a comma. Poor naming. Fix its name to describe what it really does.

  • How do I print out a vector of objects?

    Hi,
    I am having trouble printing out the contents of my vector. Can somebody please help me out. Im trying to create a vector of objects. I keep getting output like this:
    There are 5 total classes
    5
    ClassObject@13f5d07
    Here is my code:
    //Test.java
    import java.io.*;
    import java.util.*;
    import java.lang.*;
    public class Test {
            ClassObject co = new ClassObject();
            Vector vec = new Vector();
            public Test () throws Exception {
                    Read("input.dat");
            public void Read(String fileName) {
                    String num; //number of cells
                    String cells; //cell data
                    int x = 0;
                    try {
                            FileReader file = new FileReader(fileName);
                            BufferedReader in = new BufferedReader (file);
                            num = in.readLine();
                            int number = Integer.valueOf(num).intValue(); //convert string to int
                            System.out.println("There are " + number + " total classes");
                            while ((cells = in.readLine()) != null) {
                                    StringTokenizer st = new StringTokenizer(cells, "- ");
                                    while (st.hasMoreTokens()) {
                                           co.classNumber = Integer.valueOf(st.nextToken()).intValue();
                                           co.classRelation = Integer.valueOf(st.nextToken()).intValue();
                                          // System.out.println(co[x].classRelation);
                                           vec.addElement(co);
                                           x++;
                                    System.out.println("\n" + x);
                                    System.out.println(vec.lastElement());
                    catch (IOException e) {
                            System.out.println("cannot read file");
                            System.exit(0);
            public static void main (String[] args) throws Exception {
                    new Test ();
    //ClassObject.java
    import java.util.*;
    import java.lang.*;
    public class ClassObject {
            int classNumber;
            int classRelation;
    //input.dat
    5
    1-2 1-3 2-4 3-4 4-5Thanks!!!!!

    public class ClassObject
        int classNumber;
        int classRelation;
        public String toString()
            return classNumber + "-" + classRelation;
    }

Maybe you are looking for

  • Shared Review: Acrobat Pro 9; Reader 8 issues

    Hi, I've been experimenting with the Shared Review features on Acrobat 9 Pro, and we've run into some slightly odd behaivour. I created a PDF file, sent it for a shared review, and waited for the comments. All three reviewers started with Reader 8, r

  • How to modify title and tooltip text in Content Editor web part

    I have inherited a site with a page that includes two Content Editor web parts. The web parts have been left with the default titles (Content Editor [1] and [2]) and mouse-over text. I want to set these to something more appropriate so I choose the o

  • How to listen through vehicle stereo? (Gen. 5)

    I used one of these: https://discussions.apple.com/servlet/JiveServlet/showImage/2-15313880-10078/51m ZIbT2q-L._SL500_AA300_.jpg with my iPOD Classic, but it has a different connector than the iTouch has. Is there an FM transmitter or something that

  • ORA-01652 due to a SELECT DISTIINCT...ORDER BY

    Hi all, the query below fill my 32GB temporary tablespace and I get an ORA-01652. SELECT DISTINCT x.nuaud, TO_CHAR (x.times, 'DD/MM/YY HH24:MI'), x.inde1,                 x.inde2, x.inde3, x.inde4, NVL (y.litab, '????'),                 NVL (x.useru,

  • Attaching USB External Drive Results in Error Message

    I hope this is the right forum to seek help on this issue, and I hope someone can help... I have a 500 gig external hard drive hooked up to my AEBS. Because the issue I describe at the forum topic below continues, I access it by going to the "Go Menu