Print out a JFrame !

Hi all....
i have many panels and texts and Tables ... All are inside a JFrame (or a JTabbedPane)
My Question is sooooo simple :
How to Print this JFrame (or JTabbedPane) ?!
i searched the web and found so many codes but they r all so complicated...
Please any body help me with a VERY SIMPLE code doing that ?!!
(Note : the JFrame has the same dimension as an A4 Paper)
many many Thanks...

ellias2007 wrote:
Hi all....
i have many panels and texts and Tables ... All are inside a JFrame (or a JTabbedPane)
My Question is sooooo simple :What makes you think that is sooooo simple?
How to Print this JFrame (or JTabbedPane) ?!
i searched the web and found so many codes but they r all so complicated...If you have code that is too complicated, and you've searched for simpler, then what makes you think you're going to understand what we give you here?
If you have an attempt, with your own code, please post it and we'll be glad to help you understand how to get it running, but without that, then how are we to know what is sooooo simple and what is complicated to you?

Similar Messages

  • How t print out selected values from a Jlist

    hi iam trying to get the selected values from a list to print out as a string but iam getting ,Invalid cast from java.lang.Object[] to java.lang.String.is there any way to get the selected values t print ut as a string?? import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    public class MultipleSelection2 extends JFrame {
    private JList colorList, copyList;
    private JButton copy;
    private String colorNames[] =
    { "Black", "Blue", "Cyan", "Dark Gray", "Gray",
    "Green", "Light Gray", "Magenta", "Orange", "Pink",
    "Red", "White", "Yellow" };
    public MultipleSelection2()
    super( "Multiple Selection Lists" );
    Container c = getContentPane();
    c.setLayout( new FlowLayout() );
    colorList = new JList( colorNames );
    colorList.setVisibleRowCount( 5 );
    colorList.setFixedCellHeight( 15 );
    colorList.setSelectionMode(
    ListSelectionModel.MULTIPLE_INTERVAL_SELECTION );
    c.add( new JScrollPane( colorList ) );
    // create copy button
    copy = new JButton( "Copy >>>" );
    copy.addActionListener(
    new ActionListener() {
    public void actionPerformed( ActionEvent e )
    // place selected values in copyList
    copyList.setListData(
    colorList.getSelectedValues());
    String s1 =(String)colorList.getSelectedValues();

    Since the JList method 'getSelectedValues' returns an object array you'll need to iterate through the array and cast each object in the array to a string as you access them.
    Object[] o = colorList.getSelectedValues();
    for(int count=0,end=o.length; count<end; count++) {
    String s = (String) o[count];
    Hope that helps
    Talden

  • How to print the whole JFrame

    Hi,
    I got this code somewhere from the net.
    import java.awt.*;
    import javax.swing.*;
    import java.awt.print.*;
    /** A simple utility class that lets you very simply print
    *  an arbitrary component. Just pass the component to the
    *  PrintUtilities.printComponent. The component you want to
    *  print doesn't need a print method and doesn't have to
    *  implement any interface or do anything special at all.
    *  <P>
    *  If you are going to be printing many times, it is marginally more
    *  efficient to first do the following:
    *  <PRE>
    *    PrintUtilities printHelper = new PrintUtilities(theComponent);
    *  </PRE>
    *  then later do printHelper.print(). But this is a very tiny
    *  difference, so in most cases just do the simpler
    *  PrintUtilities.printComponent(componentToBePrinted).
    *  7/99 Marty Hall, http://www.apl.jhu.edu/~hall/java/
    *  May be freely used or adapted.
    public class PrintUtilities implements Printable {
      private JFrame componentToBePrinted;
      public static void printComponent(JFrame c) {
        new PrintUtilities(c).print();
      public PrintUtilities(JFrame componentToBePrinted) {
        this.componentToBePrinted = componentToBePrinted;
      public void print() {
        PrinterJob printJob = PrinterJob.getPrinterJob();
        printJob.setPrintable(this);
        if (printJob.printDialog())
          try {
            printJob.print();
          } catch(PrinterException pe) {
            System.out.println("Error printing: " + pe);
      public int print(Graphics g, PageFormat pageFormat, int pageIndex) {
        if (pageIndex > 0) {
          return(NO_SUCH_PAGE);
        } else {
          Graphics2D g2d = (Graphics2D)g;
          g2d.translate(pageFormat.getImageableX(), pageFormat.getImageableY());
          disableDoubleBuffering(componentToBePrinted);
          componentToBePrinted.paint(g2d);
          enableDoubleBuffering(componentToBePrinted);
          return(PAGE_EXISTS);
      /** The speed and quality of printing suffers dramatically if
       *  any of the containers have double buffering turned on.
       *  So this turns if off globally.
       *  @see enableDoubleBuffering
      public static void disableDoubleBuffering(Component c) {
        RepaintManager currentManager = RepaintManager.currentManager(c);
        currentManager.setDoubleBufferingEnabled(false);
      /** Re-enables double buffering globally. */
      public static void enableDoubleBuffering(Component c) {
        RepaintManager currentManager = RepaintManager.currentManager(c);
        currentManager.setDoubleBufferingEnabled(true);
    }From my main class (where the JFrame resides), the print() method is invoked to print the JFrame. However, when it is printed, it only prints the top left part of the JFrame, not the whole JFrame. Can anyone help please? Thank you very much.

    public int print(Graphics g, PageFormat pageFormat, int pageIndex) {
        if (pageIndex > 0) {
          return(NO_SUCH_PAGE);
        else {
          Graphics2D g2d = (Graphics2D)g;     
          g2d.translate(pageFormat.getImageableX(), pageFormat.getImageableY());
           double xScale = 0.63;
           double yScale = 0.56;
          g2d.scale(xScale, yScale);
          disableDoubleBuffering(componentToBePrinted);     
          componentToBePrinted.paint(g2d);
          enableDoubleBuffering(componentToBePrinted);
          return(PAGE_EXISTS);
      }Hi all,
    Alright I managed to scale it to print the whole JFrame. But another problem surfaces. When I select draft quality printing, it doesn't print the whole JFrame. Other printing qualities (standard, high) do print the whole JFrame. I am really puzzled. Anyone has any clue?
    And I have an unrelated question to this topic. How do I set a JTextField so that when I click on it the first time, it highlights its content? Have to work around with the mouselistener?
    Thank you.

  • Printing out to command window project

    hi all, i have a question on this cart program i am making, i wanted to know how to output the results to the command window every time a person clicks on the "current status" of their purchase. I want it to print out like ( 5 boxes purhcased, 4 cds bought, serial number is 1234...... ) i want it to do this until the person exits out of the program.
    i have pasted the code below thanks :)
    (copy and paste )
    import java.awt.Color;
    import java.awt.GridLayout;
    import java.awt.event.*;
    import javax.swing.*;
    import java.io.*;
    public class TestProgram extends JFrame implements ActionListener{
    JLabel column1, column2;
    JLabel totalItems, totalCost;
    JLabel serialNum;
    JLabel electronics, autos, furnitures, cds;
    JButton TrackAssets, delete;
    JPanel panel;
    JTextField electronicsAsset, autosAsset, furnituresAsset, cdsAsset;
    JTextField serialNumber;
    JTextArea items, cost;
    public TestProgram()
         column1 = new JLabel("Select Items");
    column2 = new JLabel("Specify Quantity");
    electronics = new JLabel("Electronics");
    electronicsAsset = new JTextField();
    electronicsAsset.addActionListener(this);
    autos = new JLabel("Autos");
    autosAsset = new JTextField();
    autosAsset.addActionListener(this);
    furnitures = new JLabel("Furnitures");
    furnituresAsset = new JTextField();
    furnituresAsset.addActionListener(this);
    cds = new JLabel("Compact Discs");
    cdsAsset = new JTextField();
    cdsAsset.addActionListener(this);
    serialNum = new JLabel("Serial Number input here");
    serialNumber = new JTextField();
    electronicsAsset.setNextFocusableComponent(serialNumber);
    totalItems = new JLabel("Total Items:");
    totalCost = new JLabel("Total Cost:");
    items = new JTextArea();
    cost = new JTextArea();
    TrackAssets = new JButton("Current Status");
    TrackAssets.addActionListener(this);
    delete = new JButton("Delete all");
    delete.addActionListener(this);
    panel = new JPanel();
    panel.setLayout(new GridLayout(0,4));
    panel.setBackground(Color.white);
    getContentPane().add(panel);
    panel.add(column1);
    panel.add(column2);
    panel.add(electronics);
    panel.add(electronicsAsset);
    panel.add(autos);
    panel.add(autosAsset);
         panel.add(furnitures);
         panel.add(furnituresAsset);
         panel.add(cds);
         panel.add(cdsAsset);
    panel.add(furnitures);
    panel.add(furnituresAsset);
    panel.add(totalItems);
    panel.add(items);
    panel.add(totalCost);
    panel.add(cost);
    panel.add(serialNum);
    panel.add(serialNumber);
    panel.add(delete);
    panel.add(TrackAssets);
    getContentPane().add(panel);
    panel.add(column1);
    panel.add(column2);
    panel.add(electronics);
    panel.add(electronicsAsset);
    panel.add(autos);
    panel.add(autosAsset);
         panel.add(furnitures);
         panel.add(furnituresAsset);
         panel.add(cds);
         panel.add(cdsAsset);
    panel.add(furnitures);
    panel.add(furnituresAsset);
    panel.add(totalItems);
    panel.add(items);
    panel.add(totalCost);
    panel.add(cost);
    panel.add(serialNum);
    panel.add(serialNumber);
    panel.add(delete);
    panel.add(TrackAssets);
    if(tracker.electronics.length() > 0){
                   try{
                   electronicsNo = Integer.valueOf(tracker.electronics);
                   tracker.itotal += electronicsNo.intValue();
                   catch(java.lang.NumberFormatException e){
                   electronicsAsset.setText("Invalid Value");
                   else {
                        tracker.itotal += 0;
    if(tracker.autos.length() > 0){
    try{
    autosNo = Integer.valueOf(tracker.autos);
    tracker.itotal += autosNo.intValue();
    catch(java.lang.NumberFormatException e){
    autosAsset.setText("Invalid Value");
         else {
    tracker.itotal += 0;
    if(tracker.furnitures.length() > 0){
    try{
    furnituresNo = Integer.valueOf(tracker. furnitures);
    tracker.itotal += furnituresNo.intValue();
    }catch(java.lang.NumberFormatException e){
    furnituresAsset.setText("Invalid Value");
         else {
    tracker.itotal += 0;
    if(tracker.cds.length() > 0){
    try{
    cdsNo = Integer.valueOf(tracker.cds);
    tracker.itotal += cdsNo.intValue();
    catch(java.lang.NumberFormatException e){
    cdsAsset.setText("Invalid Value");
    else {
    tracker.itotal += 0;
    serialNum = new Integer(tracker.itotal);
    output = serialNum.toString();
    this.items.setText(output);
    tracker.icost = (tracker.itotal * 300.00);
    cost = new Double(tracker.icost);
    output2 = cost.toString();
    this.cost.setText(output2);
    if(source == delete){
    serialNumber.setText("");
    electronicsAsset.setText("");
    autosAsset.setText("");
    furnituresAsset.setText("");
    cdsAsset.setText("");
    serialNumber.setText("");
    tracker.icost = 0;
    cost = new Double(tracker.icost);
    output2 = cost.toString();
    this.cost.setText(output2);
    tracker.itotal = 0;
    serialNum = new Integer(tracker.itotal);
    output = serialNum.toString();
    this.items.setText(output);
    public static void main( String[] args )
    TestProgram frame = new TestProgram();
              frame.setTitle("Asset tracking program");
    WindowListener l = new WindowAdapter() {
    public void windowClosing(WindowEvent e) {
    System.exit(0);
    frame.addWindowListener(l);
    frame.pack();
    frame.setVisible(true);

    If you want to print out to the commmend line all you need to do if put in
    System.out.println(....whatever......);Add this line of code to whereever you click the button to display the users "current Status". In hte brackets is whre you put the details of what you want ot print out e.g. boxes purchaesd etc.
    Chris

  • Add a actionlistener to JTextArea and print out string when  the user input

    Hello:
    I got a problem to add a actionlistener to JTextArea and print out string which from the user input a sentence and after the user press the "enter".
    Could anyone help me please?
    Thanks
    import java.awt.event.*;
    import java.awt.*;
    import javax.swing.*;
    import javax.swing.JScrollBar;
    public class PanelDemo extends JFrame {
       private static JTextArea tAreaUp, tAreaDown;
       private BorderLayout layout;
       private static String strings;
       public PanelDemo()
          super( " test " );
          Container container = getContentPane();
          layout = new BorderLayout();
          container.setLayout( layout );
          tAreaUp = new JTextArea(2,1);
          tAreaUp.setLineWrap(true);
          tAreaUp.setWrapStyleWord(true);
          tAreaUp.setEditable(false);
          tAreaUp.append("I am testing ");
          tAreaUp.append("I am testing");
           JScrollPane scrollPane = new JScrollPane(tAreaUp);
           scrollPane.setVerticalScrollBarPolicy(
                            JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
           scrollPane.setPreferredSize(new Dimension(250, 250));
          tAreaDown =new JTextArea(2,1);
          tAreaDown.setLineWrap(true);
          tAreaDown.setWrapStyleWord(true);
          tAreaDown.addActionListener(new TextAreaHandler());
          JScrollPane scrollPane2 = new JScrollPane(tAreaDown);
          scrollPane2.setVerticalScrollBarPolicy(
                            JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
          container.add( scrollPane, layout.CENTER );
          container.add( scrollPane2, layout.SOUTH );
          setSize( 300, 300 );
          setVisible( true );
         //private inner class for event handling
         private class TextAreaHandler implements ActionListener{
              //process textArea events
            public void actionPerformed(ActionEvent e){
               strings=e.getActionCommand();
                System.out.println(strings);
       public static void main( String args[] )
          PanelDemo application = new PanelDemo();
          application.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
    }

    Thanks for your help, but I still got a question for you.
    Do you think the way I register the even handler to the TextArea is correct?
    Because the compailer complains about that which like
    "D:\101\fig13_27\PanelDemo.java:43: cannot resolve symbol
    symbol  : method addActionListener (PanelDemo.TextAreaHandler)
    location: class javax.swing.JTextArea
          tAreaDown.addActionListener(new TextAreaHandler());

  • Component not printed out?

    hi all,
    i'm relative new to java, and surprise surprise, i have a problem (strange uh?)
    well,
    i need to write out a "RoundRectangle", that is sensible to event mouseEntered and MouseClicked: i wrote my class (JComponet) and i tried it out with a JFrame, all ok.
    now, i have added annother of my RoundRectangle, and only the second was painted.
    so, i created a JPanel (FlowLayout), and setContentPane() was made, then, i have putted (add()) both of RoundRectangle to this panel, and NONE of them was painted out.
    i had tried with a repaint, nothing.
    i have added a JLabel, and it was painted out (i putted the string of a remote file...)
    this program is splitted in two file: the output you have in your "dos prompt" is: System.out.println(f.getContentPane());
              System.out.println(aPanel.getComponentCount());
    where f is the frame, and aPanel is the panel.
    follow the code. thank for any help you could give me.
    Daniele Palumbo
    p.s.: Okuda is really famous to Star Trek World, this button, when will be operative, will be dedicated to him.
    -OkudaButton.java-
    import javax.swing.*;
    import java.awt.*;
    import java.awt.geom.*;
    import java.awt.font.*;
    public class OkudaButton extends JFrame
         public static void main(String args[])
              OkudaButton f = new OkudaButton();
              OkudaTextButton ok = new OkudaTextButton();
              OkudaTextButton ok2 = new OkudaTextButton(10,60,135,40);
              JPanel aPanel = new JPanel(new FlowLayout());
              aPanel.add(ok);
              aPanel.add(ok2);
              aPanel.add(new JLabel("Z:/ht174.jpg"));
              f.setContentPane(aPanel);
              System.out.println(f.getContentPane());
              System.out.println(aPanel.getComponentCount());
              f.show();
              ok.repaint();
         public OkudaButton()
              setSize(500,500);
              setDefaultCloseOperation(EXIT_ON_CLOSE);
    -OkudaTextButton.java-
    import java.awt.geom.*;
    import java.awt.font.*;
    import java.io.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class OkudaTextButton extends JComponent implements MouseListener
         private float x = 10f;
         private float y = 10f;
         private float width = 135f;
         private float height = 40f;
         private float warch = 20f;
         private float harch = 20f;
         private boolean mouseover = false;
         public OkudaTextButton() { addMouseListener(this); }
         public OkudaTextButton(float widthin, float heightin)
              this();
              width = widthin;
              height = heightin;
         public OkudaTextButton(int widthin, int heightin)
              this((float)widthin, (float)heightin);
         public OkudaTextButton(float xin, float yin, float widthin, float heightin)
              this(widthin, heightin);
              x = xin;
              y = yin;
         public OkudaTextButton(int xin, int yin, int widthin, int heightin)
              this((float)xin, (float)yin, (float)widthin, (float)heightin);
         public OkudaTextButton(float xin, float yin, float widthin, float heightin, float warchin, float harchin)
              this(xin, yin, widthin, heightin);
              warch = warchin;
              harch = harchin;
         public OkudaTextButton(int xin, int yin, int widthin, int heightin, int warchin, int harchin)
              this((float)xin, (float)yin, (float)widthin, (float)heightin, (float)warchin, (float)harchin);
         public void paintComponent(Graphics g)
              Graphics2D g2 = (Graphics2D)g;
              RoundRectangle2D r2d = new RoundRectangle2D.Float(x,y,width,height, 40f, 40f);
              g2.draw(r2d);
              Font okfont = null; //new Font(null, Font.PLAIN, 1);
              String fontstring = "F_stflt.ttf";
              int style = Font.PLAIN;
              int size = 20;
              try
                   Font tmpfont;
                   InputStream ttfont = new FileInputStream(fontstring);
                   // This method does not close the InputStream
                   tmpfont = Font.createFont(Font.TRUETYPE_FONT, ttfont);
                   ttfont.close();
                   okfont = tmpfont.deriveFont(style, size);
              catch (FileNotFoundException e)
                   System.out.println("file not found!");
              catch (Exception ex)
                   ex.printStackTrace();
              // fine codice maledetto...
              g2.setFont(okfont);
              g2.drawString("hello world", x + (width/20), y + (height/2) + (size/4));
         public void mouseClicked(MouseEvent e) { }
         public void mousePressed(MouseEvent e) { }
         public void mouseReleased(MouseEvent e) { }
         public void mouseEntered(MouseEvent e) { mouseover = true; System.out.println(this); }
         public void mouseExited(MouseEvent e) { mouseover = false; }
    }

    instead now i can see at least one of the two
    roundrectangle...
    but not the other!
    i can see that that the other is present, cause when i
    move my mouse i can see the button proprieties printed
    out, but it's obscurate or something else.
    thank you now i'm trying out what can be
    obviously, if you have more intresting news (for me)
    it's always a pleasure
    Danielewell, i'm not currently looking at your code, but weren't you constructing that roundrect stuff with constructor that got length and width as parameters? in such case you may call that setPreferredSixe inside constructor... this way that preferred size will always be what you most probably want it to be.
    why your other roundrect is not shwing, i don't know, but maybeyou didn't set its preferred size...
    if you would use GridBagLayout then this preferred size stuff would not matter that much, because layout manager would make your rectangles as big as possible.

  • 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

  • How can I print out the file directory?

    Years ago, I could print out a list of files in a folder from the finder window. Is there now a workaround utility to do that? I don't want to use screen shots, as the directory is too long and would require several screen shots.  thx.

    http://hints.macworld.com/article.php?story=20060720174103802
    or
    http://reviews.cnet.com/8301-13727_7-20026446-263.html

  • How can I print out the graph I need only, without the controls and indicators?

    I'm doing some programming in LABVIEW. I need to print out only the graph, without the buttons, controls, indicators. I tried to look for such a function in LABVIEW, but in vain. How can I achieve the result I expect in my programming?

    Hi Fenny,
    you should use the report generation functions to create a report containing your graph image and print it.
    Take a look at the Sample Test Report.vi you find in the report examples of LV.
    Just look at the part of the diagram where it is used Append Control Image to report.vi (in the center of the report functions chain); a graph reference is wired to the Ctrl reference input ( to create a reference of your graph right click on it and select create reference).
    Let me know if you need more help,
    Alberto

  • How can I print out the contents of my hardrive

    I have a hardrive with about 200 video clips and need to print the titles for cross refrerencing. I was just going to "grab" screenshots but this will take about ten sheets of paper. How can I print out a list of all the files on the drive?

    I tried this Finder drag method & discovered that it is very important to set the blank TextEdit document to plain text before the drag (from the format menu or with Cmd-shift-t). If you don't, TextEdit attempts to load the content of the files!
    Once I discovered this, I tried the method with Find (Cmd-F) results & it works for that, too. This means that by choosing the right combination of search location(s) & search criteria, you can extend the method to filter the list to just about any files you want, which could be very handy.
    For instance, set the "Kind" criteria to "QuickTime Movie" & location to "Computer" & you get a list of every QT movie. Or set the search location to the folder containing the movies of interest & you get all of them, including ones in subfolders. You could also use the 'date created' or other search criteria to filter the list to a specific subset of movies (or whatever).
    If you need to do this often, you could create one or more 'Smart Folders' with the criteria preloaded for each search.
    The only drawback I see for either Finder based method is the full path one. If you are getting results from just one or a few folders, Find & Replace can delete any of the path name fairly easily, but it becomes a chore if there are a lot of different ones. Some other text editor, like TexEdit Pro, that supports grep searches would be handy here, but since I'm not up to speed on grep, someone else will have to explain how to use it for this, if they want.

  • How can i print out the waveform chart?

      hello everybody,
    how can i print out the "waveform chart". can i do it just push the button. ( example; stop button is stop the program etc..)
    i checked the NI examples but i can't understand. i'm new to the Labview.
    pls help me.
    i added the my program
    look forward your reply
    regards from turkey...
    Message Edited by hknmkt on 05-29-2008 04:15 AM
    Attachments:
    29.05.2008_11.vi ‏37 KB

        hi jim,
    i tried the program but it's not running. When i run the program, it's print out without run the program
    i added the printed file.
    look forward your reply
    hakan
    Attachments:
    error8.JPG ‏8 KB

  • PO print out of delivery schedule

    Hi,
    Suppose I am generating a PO , in some cases I will be giving delivery schedule for some items in item details.
    I want this to come in the print out.
    But its not coming .
    Please advise.
    regards,

    Hi
    You can include logic with the help of Developre, If information is there in EKET for Purchase order ask him to include in print.
    regards
    Srinivas

  • How to print out wallet size photos on 6510 e-all-in-one series photosmart printer

    want to print out wallet size photos (size 3 and a half x 2 and a half).  I have windows XP and my printer is the photosmart 6510 e-all-in-one series

    You will have to change the settings in the photo editing software and put 2 wallets on a 4x6 or 9 wallets on a full page.  The photo tray will not take paper smaller than 4x6.
    SandyBob
    If I have solved your issue, please feel free to provide kudos and make sure you mark this thread as solution provided!
    Although I work for HP, my posts and replies are my own opinion and not those of HP
    1-800-474-6836

  • Freezing when trying to print out PDF?

    Trying to print out PDF of Aperture 'book'. Each time it freezes on the same page ... this particular page is where I have one image stretched across two pages. Is this possibly a glitch with Aperture?
    Ben
    I've trashed my preferences several times; doesn't seem to help. I've also tried to use two copies of the same picture (right half on right page, left half on left page); but that doesn't work too well, as Aperture seems to want to favor one side or the other – and thus I can't adjust the two sides to match up properly.
    Any suggestions would be most appreciated, thank you,
    Ben

    Hi Allen,
    I'm all topped up, big graphics card, latest ver. of Tiger, permissions repaired every day or so. The mystery continues.
    I love the IDEA of the two page spread. Have longed for it in Pages, where I'm producing a whole series of books ... a lot of two page spreads (but done by using two versions of the same still).
    Thanks,
    Ben

  • New Ink Cartridge but can not print out/copy any document.

    I have HP Printer Deskjet 1050. I've just bought 1 x Original HP Ink Cartridge Colour Black No.61 that can be used as well for my HP Deskjet 1050 (because I could't get No.802 Black Cartridge). I have pulled out the empty one and pushed the new one in until I heard snap sound (I've followed as what is in the instruction poster). Before my old Ink was empty, I was able to print either black or colour. Now, after I've got new one pushed in, I couldn't print nothing, even the alignment page doesn't automatically print out after all cartridges are pushed in and cartridge door was closed. My Black Ink warning light is blinking all the time. I can scan to my computer/laptop but can not print it out or make copy from the printer. This printer is not compatible for my laptop with OS Windows 8.1 (64-bit), but I was able to use my printer for printing thru my laptop by using HP AiO Printer Remote. Please help?

    Hi @KroebY, 
    Welcome to the HP support Forums! I see you have replaced the black cartridge on your HP Deskjet 1010, but it is not registering the new cartridge. You are unable to copy or print, you can make a scan. I notice you said your DJ 1010 was not compatible with the Windows 8.1 Operating system, there are full feature software and drivers available for your printer.
    Let's start troubleshooting the print quality issues: Printer Prints a Blank Page or Does Not Print Black or Color Ink for the HP Deskjet Ink Advantage an...
    Does this help, are you now able to print and make a copy? If yes, continue below:
    Now, the software:
    1. Unplug the USB if using a direct connection.
    2. Remove the HP DJ 1010 software from your computers Control Panel's Uninstall a program option.
    3. Restart the computer.
    4. Make sure all the DJ 1010 software is gone from the programs list as well as your HP folder listed under the All programs in your Start Menu.
    5. Now go ahead and download the software and drivers for your DJ 1010 (DO NOT plug in USB until the software prompts you to):
    http://h10025.www1.hp.com/ewfrf/wc/softwareDownloadIndex?softwareitem=dj-117518-4&cc=us&dlc=en&lc=en...
    6. Go ahead and print a test page.
    7. If you are unable to print a test page, please run the HP Print and Scan Doctor- It was designed by HP to provide users with the troubleshooting and problem solving features needed to resolve many common problems experienced with HP print and scan products connected to Windows-based computers.
    Please let me know if you are not able to print, and if the installation was successful.  I will watch for your reply.
    Thank you,
    HevnLgh
    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!

Maybe you are looking for

  • Feature Requests beyond BlackBerry OS10.3.1

    So, with 10.3.0 and 10.3.1 now officially released on the Passport and Classic, let's look forward! What feature request(s) would you like to see included in future updates, say OS10.3.2 and beyond? Of course, there's nothing official to this thread,

  • Frozen ipod and itunes not recognizing!!!

    My 40gb ipod has frozen on a song and I cannot turn it off or on... It's not responding to anything. I updated my itunes and it won't even recognise my ipod, my pc won't even recognise it. Please help me, what am I supposed to do?

  • RRB- Quantity from Project and rate from sales order

    Hi All, I got scenerio in my project where project is having resource related billing. Now ap per the client requirement, we have a sals order and projects. All prjects are software projects. Now my requirement is client is looking for a system there

  • Commit delete

    Hello, I'm trying something new on this and I am wondering if anyone has ideas. In the past rollback segment size wasn't something that mattered. We could make them as big as we wanted. We can no longer do that so when I go to delete 4 million record

  • The GPS Option Doesn't Show Up at All

    As Above. The GPS option every guide has been talking about doesn't show up under options or advanced settings at all. The closest thing i get to GPS is Location settings and it is not doing much. I'm using a Verizon set. I'm also using it out of the