Can you e print with a officejet 8500 a909 using window OS

Can you eprint  on a officejet 8500 a909 using windows 8 os

No,
The Officejet Pro 8500 (A909) does not support the ePrint feature regardless the operating system version. you may find the product capabilities listed below:
http://h10025.www1.hp.com/ewfrf/wc/document?docname=c02814760&cc=sg&dlc=en&lc=en&product=5070121&tmp...
Shlomi
Say thanks by clicking the Kudos thumb up in the post.
If my post resolve your problem please mark it as an Accepted Solution

Similar Messages

  • Can not cancel print job hp officejet 8500 in windows 8

    I can not cancel print job for a HP officejet 8500 in windows 8
    This question was solved.
    View Solution.

    Hi,
    From the Desktop, hold down the Windows key and press R.  Into the Run window, type services.msc and hit enter.  Browse down to the print spooler service, right click it and select Properties then click on the Stop button.  Now browse to C:\Windows\System32\Spool\PRINTERS and delete the job inside this folder - You may need to click a prompt to gain the appropriate authority to open the PRINTERS folder.
    Restart the computer and you should find the document(s) have been removed.
    Regards,
    DP-K
    ****Click the White thumb to say thanks****
    ****Please mark Accept As Solution if it solves your problem****
    ****I don't work for HP****
    Microsoft MVP - Windows Experience

  • HT4356 Can I air print from hp officejet 8500 wireless to ipad2?

    Do I need to download an app for air printing from wireless hp 8500 printer to ipad 2?

    The 8500 models that support AirPrint are :
    HP Officejet Pro 8500A e-All-In-One A910a
    HP Officejet Pro 8500A Plus e-All-In-One A910g
    HP Officejet Pro 8500A Premium e-All-In-One A910g
    If it's not one those then yes, you will need an app. HP have their ePrint app which might support it, otherwise there are third-party printer apps such as Print Central For iPad and Print n Share which might work with it.

  • On a Mac, can you navigate menus with one handed key strokes like Windows?

    On a Mac, is there anyway to navigate menus with one handed keyboard strokes like you can in Windows? My girlfriend is a graphic designer and switched from Windows to Mac. She misses being able to use the Alt key and make menu selections. On Windows she can press "Alt" and then move through menus and submenus with one hand on the keyboard. When you press "Alt" the first letter of every menu is highlighted. When she presses a certain letter the menu drops down, and the first letter of every submenu is then highlighted. She can then navigate through all the submenus until she hits the selection she wants, all using the left hand on the keyboard. It's very fast and efficient. Can you do something similar to this on a Mac?
    The reason she wants to do this is because when she is in Photoshop, she likes to use her right hand on the mouse with the cursor inside the canvas (sketching, moving layers around) while she makes menu commands with the left hand. It is 10 times faster this way than using the mouse for everything. Hot keys are not the same because you must have those memorized. With the "Alt" key function, you can open a drop down menu, see the choices, and make your selection.
    I have been a Mac person my whole life, and I have to say, it's a pretty awesome function. I really want the Mac to have something similar.

    Barney-15E wrote:
    [Actual studies|http://www.asktog.com/TOI/toi06KeyboardVMouse1.html] have found it is faster to use the mouse to make command activations than using keyboard shortcuts.
    The 20-year-old argument on that web page isn't very convincing. Keyboard shortcuts are certainly faster for experience power users who do the same thing every day. The mouse is faster only for new users or users doing non-repetitive commands every day.
    It is interesting that one of the posts on that page said this:
    I remember one mainframe company in the sixties that came up with the following command-key guidelines:
    Use the first letter of the command word
    If the first letter is already used, use the last letter
    If the last letter is already used, use the second letter
    If the second letter is already used, use the second-to-the-last letter
    etc.
    This is actually very similar to how the keyboard-driven menus work in Mac OS X. The advantage over the Windows method is that when there is more than one command in a menu that shares the same first letter, you do not have to memorize which command uses which letter. You just type ahead until the correct command is selected.
    I would, however, encourage Derek Doublin1's girlfriend to learn the direct keyboard shortcuts in Photoshop. On Mac or PC, for me pressing Command-Option-I is much faster than either the mouse or using the keyboard to drop the Image menu and walk down to the Image Size command.

  • Can you do anything with a .band file on a Windows PC?

    I am in a music production class in school where we use Macs. However, at home I can only use a PC running Windows 7. Obvoiusly there is no Garage Band program for Windows. I was wondering if it was possible to import the .band file into the GarageBand iOS app. (I have a 4gen iPod Touch.) If not, then is there anyway I can make the file useful? I know that if you open the .band file (Which appears as a folder) you can get some of the recording you made with the microphone, but you can't use loops and such.

    the only thing you could do is export each track while using GB, the only other software that can open a GB project is Logic
    afig110610 wrote:
    I was wondering if it was possible to import the .band file into the GarageBand iOS app.
    http://www.bulletsandbones.com/GB/GBFAQ.html#exportgbxtogbi
    (Let the page FULLY load. The link to your answer is at the top of your screen)

  • I can't sync iphone with itunes via USB, Im using windows 8.1 system, after update7.0.6 itunes was not detect the iphone, pls help....

    can't sync itunes with iphone via USB, windows 8.1 system

    Right click on your device under Portable devices and click on Uninstall and when the uninstaller box pop ups select delete the driver and click OK. Now click on Scan for hardware changes on top of the page and see if you get apple mobile device support driver under USB Devices and if not then disconnect your device from the computer and try to connect it to a different USB port and check also open control panel and select Apple Mobile Device  Support from the List and Click on Repair and check. If still the device is not showing under USB then uninstall the following services from your computer.
    iTunes
    Apple Software Update
    Apple Mobile Device Support (if unable to uninstall ignore and move to next)
    Bonjour
    Apple Application Support
    Restart your computer once after the uninstallation is completed and then download latest version of iTunes from http://WWW.apple.com/iTunes/download
    Locate the iTunes setup file and right click the file and run the installation file as Administrator and let the installation complete.
    Then check if your device gets deteced in iTunes and if still the device is not detecting in itunes then go to device manager and see under Usb if you can see Apple Mobile Device Support Driver and continue with the step. 5 of above given link in my previous post. And if still thedevice is not showing under USB then right click on your device under potable device and click update driver and first check for updates automatically and see under USB if you see the driver now and if not then go back to device under portable device select update driver, let me choose driver from the list, Have disk, browse file in the following location " C://Program Files/Common Files/Apple/Mobile Device Support/Drivers and select usbaapl file and install the same (if you can't find the driver on above location then look for the driver in Program Files(x86) instead of Program files and if you can't find usbaapl then look for usbaapl64 and complete the installation and then restart the computer and check if your device get recognized in iTunes.
    Note: when installing the drivers keep the iTunes closed till the drivers installation is completed.

  • Why can't I print pdf any more?  I use Windows 7, and HP printer and AR XI version 11.0.07, having updated today from 11.0.06

    It seems I'm not the only one with printing problems, so look forward to a reply.

    Two things to try: open Adobe Reader | Edit | Preferences
    under Security (Enhanced), disable Protected Mode
    under Documents, set View documents in PDF/A mode: to Never

  • Can you not print pdf to iphoto anymore with OS X Lion?

    Just downloaded Mac OS X Lion.
    Can you noit print pdf to iphoto anymore with OS X Lion?

    From what I am able to determine, the functionality that I enjoyed before upgrading to Lion is no longer available. Previously, one could open a PDF using Preview, select Print and then "Send to iPhoto."  This feature is not there anymore. That is a major disappointment as I used it quite regularly at the non-profit support serviceI volunteer at. 

  • I have an iMac running OS X 10.8.3 and have connected an Epson Workforce 2540 printed that is allegedly Airprint enabled. I can connect and print with a USB cable but can't connect via Airprint. My colleague running 10.7 can. Is this a feature of 10.8?

    I have an iMac running OS X 10.8.3 and have connected an Epson Workforce 2540 printed that is allegedly Airprint enabled. I can connect and print with a USB cable but can't connect via Airprint. My colleague running 10.7 can. Is this a feature of 10.8? Any ideas for a fix?

    iOS devices use AirPrint to connect to a supported printer. OS X will use Bonjour to locate and connect to the same printer.
    With the Epson connected to your wireless router, when you open Print & Scan and click the plus button to add, does the Epson appear in a small box with a heading of Nearby Printers?
    If not and a window appears showing Default, Fax, IP and Windows in the toolbar, do you see the Epson with the Default view selected?

  • Can I Air Print with Photosmart C4180?

    How Can I Air Print with Photosmart C4180?

    Take a look at this link.  It will give you information on the options you have
    http://www8.hp.com/us/en/support-topics/mobile-printing/how-to-print-mobile-devices-ipad-iphone.html
    I was an HP employee
    If I have helped you solve your issue please mark it as solved
    **Say Thanks By Clicking on the Kudos Star**

  • Hello, we have both Creative Cloud and Creative Cloud for teams. Can you help me with the difference and if i need to have both?

    Hello, we have both Creative Cloud membership and Creative Cloud for team. Can you help me with the difference and if i need to have both? We have 9 employees that are using it. Just not sure if i'm paying for something i don't need.
    Thank you

    Please refer to Creative Cloud Help | Creative Cloud / Common Questions
    CC is for retail use with 20 GB of storage space, CCT is where number of seats are purchased & assigned by one program admin where each seat gets 100GB of storage space.
    You can not have both the CC & team in one account as it will only provide you added storage space of 120 GB but you can activate the CC any of them or either of them twice as CC is based on Adobe ID.
    Regards
    Rajshree

  • Can you help me with mouse pressed method please?

    hi
    can you help me with my problem please, player label doesn't show up in the applet and the draw string method it doesn't draw any strings like X or O for the game I don't know what is the problem maybe it is with MousePressed method which is in Board class. I tried to write the code of the location many times I'm not sure if the problem comes from there.
    there is no error in my code, but it doesn't work.
    this is class Board which has the mouseListener
    class Board extends JPanel  implements MouseListener, MouseMotionListener
        private JLabel playerlabel; 
         private boolean play;
         private boolean start;
        private int turn; 
        private Square squares[][];
      private Player myplayer[][];
         public Board()
              setBackground( Color.WHITE );
              playerlabel = new JLabel( "X player first" );
              //playerlabel.setLayout(null);
         //     playerlabel.setLocation(500,500);
              add( playerlabel );
              play = true;
              turn = 1;
             squares = new Square[3][3];
             myplayer = new Player[3][3];
             int x = 40;
              int y = 40;
              for (int i=0; i<3; i++){
                   x = 40;
                   for (int j=0; j<3; j++){
                        Square s = new Square( x,y );
                        squares[i][j] = s;
                        x +=50;
                   y +=50;
                this.addMouseListener(this);
            this.addMouseMotionListener(this);
          public void mouseClicked( MouseEvent event ){}
          public void mouseMoved( MouseEvent event ){}
          public void mouseEntered( MouseEvent event ){}
          public void mouseExited( MouseEvent event ){}
          public void mousePressed( MouseEvent event )
          {int xPos = event.getX();
                  int yPos = event.getY();
                    if(play && turn ==1){
                    for (int i=0; i<3; i++){
                        for (int j=0; j<3; j++){
                             int x = squares[i][j].getX();
                             int y = squares[i][j].getY();
                             if(xPos> x && xPos<x+40&& yPos> y && yPos<y+40){
                                  if( squares[i][j].getOccupied() ==0 ){
                                       String ptext;
                                       ptext = "X";
                                       Player p = new Player(x, y,ptext);
                                       myplayer[i][j] = p;
                                       squares[i][j].setOccupied(1);
                                       playerlabel.setText( "O Player Turn" );
                                       turn = 2;
                                       repaint();
                                       Win();
                                  else{
                                       turn = 2;
                                       playerlabel.setText( "O Player Turn" );
                                       repaint();
              if ( play && turn ==2 )
    for (int i=0; i<3; i++){
                        for (int j=0; j<3; j++){
                             int x = squares[i][j].getX();
                             int y = squares[i][j].getY();
                             if(xPos> x && xPos<x+40&& yPos> y && yPos<y+40){
                                  if( squares[i][j].getOccupied() ==0 ){
                                       String ptext;
                                       ptext = "O";
                                       Player p = new Player(x, y,ptext);
                                       myplayer[i][j] = p;
                                       squares[i][j].setOccupied(2);
                                       playerlabel.setText( "X Player Turn" );
                                       turn = 1;
                                       repaint();
                                       Win();
                                  else{
                                       turn = 1;
                                       playerlabel.setText( "X Player Turn" );
                                       repaint();
          public void mouseReleased( MouseEvent event )
          public void mouseDragged( MouseEvent event )
         public void Win(){
              if(squares[0][0].getOccupied() == squares[0][1].getOccupied() &&squares[0][1].getOccupied()==squares[0][2].getOccupied() &&squares[0][2].getOccupied() == 1)
              {playerlabel.setText("Player 1 X WON THE GAME!");
              play =false;          }
              else if (squares[1][0].getOccupied() == squares[1][1].getOccupied() &&squares[1][1].getOccupied()==squares[1][2].getOccupied() &&squares[1][2].getOccupied() == 1)
              {playerlabel.setText("Player 1 X WON THE GAME!");
              play =false;          }
              else      if(squares[2][0].getOccupied() == squares[2][1].getOccupied() &&squares[2][1].getOccupied()==squares[2][2].getOccupied() &&squares[2][2].getOccupied() == 1)
              {playerlabel.setText("Player 1 X WON THE GAME!");
              play =false;          }
                   if(squares[0][0].getOccupied() == squares[0][1].getOccupied() &&squares[0][1].getOccupied()==squares[0][2].getOccupied() &&squares[0][2].getOccupied() == 2)
              {playerlabel.setText("Player 2 O WON THE GAME!");
              play =false;          }
              else if (squares[1][0].getOccupied() == squares[1][1].getOccupied() &&squares[1][1].getOccupied()==squares[1][2].getOccupied() &&squares[1][2].getOccupied() == 2)
              {playerlabel.setText("Player 2 O WON THE GAME!");
              play =false;          }
              else      if(squares[2][0].getOccupied() == squares[2][1].getOccupied() &&squares[2][1].getOccupied()==squares[2][2].getOccupied() &&squares[2][2].getOccupied() == 2)
              {playerlabel.setText("Player 2 O WON THE GAME!");
              play =false;          }
              //Vertically win
               if (squares[0][0].getOccupied() == squares[1][0].getOccupied() &&squares[1][0].getOccupied()==squares[2][0].getOccupied() &&squares[2][0].getOccupied() == 1)
              {playerlabel.setText("Player 1 X WON THE GAME!");
              play =false;          }
              else if (squares[0][1].getOccupied() == squares[1][1].getOccupied() &&squares[1][1].getOccupied()==squares[2][1].getOccupied() &&squares[2][1].getOccupied() == 1)
              {playerlabel.setText("Player 1 X WON THE GAME!");
              play =false;          }
              else      if(squares[0][2].getOccupied() == squares[1][2].getOccupied() &&squares[1][2].getOccupied()==squares[2][2].getOccupied() &&squares[2][2].getOccupied() == 1)
              {playerlabel.setText("Player 1 X WON THE GAME!");
              play =false;          }
               if (squares[0][0].getOccupied() == squares[1][0].getOccupied() &&squares[1][0].getOccupied()==squares[2][0].getOccupied() &&squares[2][0].getOccupied() == 2)
              {playerlabel.setText("Player 2 O WON THE GAME!");
              play =false;          }
              else if (squares[0][1].getOccupied() == squares[1][1].getOccupied() &&squares[1][1].getOccupied()==squares[2][1].getOccupied() &&squares[2][1].getOccupied() == 2)
              {playerlabel.setText("Player 2 O WON THE GAME!");
              play =false;          }
              else      if(squares[0][2].getOccupied() == squares[1][2].getOccupied() &&squares[1][2].getOccupied()==squares[2][2].getOccupied() &&squares[2][2].getOccupied() == 2)
              {playerlabel.setText("Player 2 O WON THE GAME!");
              play =false;          }
              //Diagonal win
                    if (squares[0][0].getOccupied() == squares[1][1].getOccupied() &&squares[1][1].getOccupied()==squares[2][2].getOccupied() &&squares[2][2].getOccupied() == 1)
              {playerlabel.setText("Player 1 X WON THE GAME!");
              play =false;          }
              else if (squares[0][2].getOccupied() == squares[1][1].getOccupied() &&squares[1][1].getOccupied()==squares[2][0].getOccupied() &&squares[2][0].getOccupied() == 1)
              {playerlabel.setText("Player 1 X WON THE GAME!");
              play =false;          }
               if (squares[0][0].getOccupied() == squares[1][1].getOccupied() &&squares[1][1].getOccupied()==squares[2][2].getOccupied() &&squares[2][2].getOccupied() == 2)
              {playerlabel.setText("Player 2 O WON THE GAME!");
              play =false;          }
              else if (squares[0][2].getOccupied() == squares[1][1].getOccupied() &&squares[1][1].getOccupied()==squares[2][0].getOccupied() &&squares[2][0].getOccupied() == 2)
              {playerlabel.setText("Player 2 O WON THE GAME!");
              play =false;          }
         }//end win
    public void setTurn(int t)
              turn = t;
              playerlabel.setText( "X Player Plays First" );
         public void paintComponent( Graphics g )
               super.paintComponent( g );
               this.setBackground( Color.WHITE );
              for (int i=0; i<3; i++){
                   for (int j=0; j<3; j++){
                        g.setColor( Color.BLACK );
                         g.drawRect( squares[i][j].getX(), squares[i][j].getY(), 50, 50 );     
               for (int i=0; i<3; i++){
                   for (int j=0; j<3; j++){
                         myplayer[i][j].draw(g);     
            //End of paintComponent   
    }and this is the whole code of my program.
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.util.*;
    class Player{
         private int xCoordinate;
         private int yCoordinate;
        private String playerText;
      public   Player(int x, int y, String t)
            playerText = t;
            xCoordinate = x;
            yCoordinate = y;
        public void draw(Graphics g)
               g.drawString(playerText,  xCoordinate, yCoordinate);
         public void SetText(String t)
         { playerText = t;
    }//end player
    class Square
         private int x;
         private int y;
         private int occupied;
         public Square(int x1, int y1)
              x = x1;
              y= y1;
              occupied = 0;
         public void setX(int x1)
              x = x1;
         public int getX()
              return x;
         public void setY(int y1)
              y = y1;
         public int getY()
              return y;
         public void setOccupied(int o)
              occupied = o;
         public int getOccupied()
              return occupied;
    public class TicTac extends JApplet implements ActionListener
    { private JPanel panel;
         private JButton newgame;
         private Board B;
         public void init()
              B = new Board();
              add( B, BorderLayout.CENTER );
              panel = new JPanel();
               newgame = new JButton( "New Game" );
               panel.add( newgame);
               add( panel, BorderLayout.SOUTH );
               newgame.addActionListener(this);
              public void actionPerformed( ActionEvent ev)
               {     Object source = ev.getSource();
         if (source == newgame)
                    {remove(B);
                   repaint();
              B = new Board();
                   add( B, BorderLayout.CENTER );
         B.setTurn(1);
                   repaint();
                   validate();
            }//end class TicTac
    class Board extends JPanel  implements MouseListener, MouseMotionListener
        private JLabel playerlabel; 
         private boolean play;
         private boolean start;
        private int turn; 
        private Square squares[][];
      private Player myplayer[][];
         public Board()
              setBackground( Color.WHITE );
              playerlabel = new JLabel( "X player first" );
              //playerlabel.setLayout(null);
         //     playerlabel.setLocation(500,500);
              add( playerlabel );
              play = true;
              turn = 1;
             squares = new Square[3][3];
             myplayer = new Player[3][3];
             int x = 40;
              int y = 40;
              for (int i=0; i<3; i++){
                   x = 40;
                   for (int j=0; j<3; j++){
                        Square s = new Square( x,y );
                        squares[i][j] = s;
                        x +=50;
                   y +=50;
                this.addMouseListener(this);
            this.addMouseMotionListener(this);
          public void mouseClicked( MouseEvent event ){}
          public void mouseMoved( MouseEvent event ){}
          public void mouseEntered( MouseEvent event ){}
          public void mouseExited( MouseEvent event ){}
          public void mousePressed( MouseEvent event )
          {int xPos = event.getX();
                  int yPos = event.getY();
                    if(play && turn ==1){
                    for (int i=0; i<3; i++){
                        for (int j=0; j<3; j++){
                             int x = squares[i][j].getX();
                             int y = squares[i][j].getY();
                             if(xPos> x && xPos<x+40&& yPos> y && yPos<y+40){
                                  if( squares[i][j].getOccupied() ==0 ){
                                       String ptext;
                                       ptext = "X";
                                       Player p = new Player(x, y,ptext);
                                       myplayer[i][j] = p;
                                       squares[i][j].setOccupied(1);
                                       playerlabel.setText( "O Player Turn" );
                                       turn = 2;
                                       repaint();
                                       Win();
                                  else{
                                       turn = 2;
                                       playerlabel.setText( "O Player Turn" );
                                       repaint();
              if ( play && turn ==2 )
    for (int i=0; i<3; i++){
                        for (int j=0; j<3; j++){
                             int x = squares[i][j].getX();
                             int y = squares[i][j].getY();
                             if(xPos> x && xPos<x+40&& yPos> y && yPos<y+40){
                                  if( squares[i][j].getOccupied() ==0 ){
                                       String ptext;
                                       ptext = "O";
                                       Player p = new Player(x, y,ptext);
                                       myplayer[i][j] = p;
                                       squares[i][j].setOccupied(2);
                                       playerlabel.setText( "X Player Turn" );
                                       turn = 1;
                                       repaint();
                                       Win();
                                  else{
                                       turn = 1;
                                       playerlabel.setText( "X Player Turn" );
                                       repaint();
          public void mouseReleased( MouseEvent event )
          public void mouseDragged( MouseEvent event )
         public void Win(){
              if(squares[0][0].getOccupied() == squares[0][1].getOccupied() &&squares[0][1].getOccupied()==squares[0][2].getOccupied() &&squares[0][2].getOccupied() == 1)
              {playerlabel.setText("Player 1 X WON THE GAME!");
              play =false;          }
              else if (squares[1][0].getOccupied() == squares[1][1].getOccupied() &&squares[1][1].getOccupied()==squares[1][2].getOccupied() &&squares[1][2].getOccupied() == 1)
              {playerlabel.setText("Player 1 X WON THE GAME!");
              play =false;          }
              else      if(squares[2][0].getOccupied() == squares[2][1].getOccupied() &&squares[2][1].getOccupied()==squares[2][2].getOccupied() &&squares[2][2].getOccupied() == 1)
              {playerlabel.setText("Player 1 X WON THE GAME!");
              play =false;          }
                   if(squares[0][0].getOccupied() == squares[0][1].getOccupied() &&squares[0][1].getOccupied()==squares[0][2].getOccupied() &&squares[0][2].getOccupied() == 2)
              {playerlabel.setText("Player 2 O WON THE GAME!");
              play =false;          }
              else if (squares[1][0].getOccupied() == squares[1][1].getOccupied() &&squares[1][1].getOccupied()==squares[1][2].getOccupied() &&squares[1][2].getOccupied() == 2)
              {playerlabel.setText("Player 2 O WON THE GAME!");
              play =false;          }
              else      if(squares[2][0].getOccupied() == squares[2][1].getOccupied() &&squares[2][1].getOccupied()==squares[2][2].getOccupied() &&squares[2][2].getOccupied() == 2)
              {playerlabel.setText("Player 2 O WON THE GAME!");
              play =false;          }
              //Vertically win
               if (squares[0][0].getOccupied() == squares[1][0].getOccupied() &&squares[1][0].getOccupied()==squares[2][0].getOccupied() &&squares[2][0].getOccupied() == 1)
              {playerlabel.setText("Player 1 X WON THE GAME!");
              play =false;          }
              else if (squares[0][1].getOccupied() == squares[1][1].getOccupied() &&squares[1][1].getOccupied()==squares[2][1].getOccupied() &&squares[2][1].getOccupied() == 1)
              {playerlabel.setText("Player 1 X WON THE GAME!");
              play =false;          }
              else      if(squares[0][2].getOccupied() == squares[1][2].getOccupied() &&squares[1][2].getOccupied()==squares[2][2].getOccupied() &&squares[2][2].getOccupied() == 1)
              {playerlabel.setText("Player 1 X WON THE GAME!");
              play =false;          }
               if (squares[0][0].getOccupied() == squares[1][0].getOccupied() &&squares[1][0].getOccupied()==squares[2][0].getOccupied() &&squares[2][0].getOccupied() == 2)
              {playerlabel.setText("Player 2 O WON THE GAME!");
              play =false;          }
              else if (squares[0][1].getOccupied() == squares[1][1].getOccupied() &&squares[1][1].getOccupied()==squares[2][1].getOccupied() &&squares[2][1].getOccupied() == 2)
              {playerlabel.setText("Player 2 O WON THE GAME!");
              play =false;          }
              else      if(squares[0][2].getOccupied() == squares[1][2].getOccupied() &&squares[1][2].getOccupied()==squares[2][2].getOccupied() &&squares[2][2].getOccupied() == 2)
              {playerlabel.setText("Player 2 O WON THE GAME!");
              play =false;          }
              //Diagonal win
                    if (squares[0][0].getOccupied() == squares[1][1].getOccupied() &&squares[1][1].getOccupied()==squares[2][2].getOccupied() &&squares[2][2].getOccupied() == 1)
              {playerlabel.setText("Player 1 X WON THE GAME!");
              play =false;          }
              else if (squares[0][2].getOccupied() == squares[1][1].getOccupied() &&squares[1][1].getOccupied()==squares[2][0].getOccupied() &&squares[2][0].getOccupied() == 1)
              {playerlabel.setText("Player 1 X WON THE GAME!");
              play =false;          }
               if (squares[0][0].getOccupied() == squares[1][1].getOccupied() &&squares[1][1].getOccupied()==squares[2][2].getOccupied() &&squares[2][2].getOccupied() == 2)
              {playerlabel.setText("Player 2 O WON THE GAME!");
              play =false;          }
              else if (squares[0][2].getOccupied() == squares[1][1].getOccupied() &&squares[1][1].getOccupied()==squares[2][0].getOccupied() &&squares[2][0].getOccupied() == 2)
              {playerlabel.setText("Player 2 O WON THE GAME!");
              play =false;          }
         }//end win
    public void setTurn(int t)
              turn = t;
              playerlabel.setText( "X Player Plays First" );
         public void paintComponent( Graphics g )
               super.paintComponent( g );
               this.setBackground( Color.WHITE );
              for (int i=0; i<3; i++){
                   for (int j=0; j<3; j++){
                        g.setColor( Color.BLACK );
                         g.drawRect( squares[i][j].getX(), squares[i][j].getY(), 50, 50 );     
               for (int i=0; i<3; i++){
                   for (int j=0; j<3; j++){
                         myplayer[i][j].draw(g);     
            //End of paintComponent   
            Edited by: mshadows on May 18, 2008 7:53 AM

    I was playing with this a little bit and came up with this game model, something that I'm sure can be improved upon greatly:
    TttXO.java
    an enum to encapsulate X vs O. I could use a boolean here since it has 2 states, but this seems more intuitive to me
    package dy08.m05.ttt;
    * tic tac toe encapsulation of X vs O
    * @author Pete
    public enum TttXO
        X, O
    }TttCell.java
    encapsulates an individual cell in the tictactoe grid.
    package dy08.m05.ttt;
    * Tic Tac Toe Game cell
    * can be occupied or not
    * can hold TttXO X or O or null 
    * @author Pete
    public class TttCell
        private boolean occupied = false;
        private TttXO xo = null;
        public TttCell()
         * sets a Square for either x or o
         * @param TttXO
         * @return true if successful, false if already occupied
        public boolean setXO(TttXO xo)
            if (occupied)
                return false;
            else
                occupied = true;
                this.xo = xo;
                return true;
        public void reset()
            occupied = false;
            xo = null;
        public boolean isOccupied()
            return occupied;
        public TttXO getXO()
            return xo;
        // used to test and debug the class
        public String toString()
            if (occupied)
                return xo.toString();
            else
                return "-";
    package dy08.m05.ttt;
    * Tic Tac Toe game model
    * @author Pete
    public class TttGameModel
        private TttCell[][] cellGrid = new TttCell[3][3];
        private boolean xTurn = true;
        private boolean win = false;
        public TttGameModel()
            for (int i = 0; i < cellGrid.length; i++)
                for (int j = 0; j < cellGrid.length; j++)
    cellGrid[i][j] = new TttCell();
    public void reset()
    xTurn = true;
    win = false;
    for (int i = 0; i < cellGrid.length; i++)
    for (int j = 0; j < cellGrid[i].length; j++)
    cellGrid[i][j].reset();
    public boolean isXTurn()
    return xTurn;
    public boolean isWin()
    return win;
    * @param row
    * @param col
    * @return true if valid move, false if game already over or cell occupied
    public boolean takeTurn(int col, int row)
    TttXO currentXO = TttXO.O;
    TttCell cell = cellGrid[row][col];
    if (win)
    return false;
    if (cell.isOccupied())
    return false;
    if (xTurn)
    currentXO = TttXO.X;
    cell.setXO(currentXO);
    win = checkWin(col, row, currentXO);
    xTurn = !xTurn; // toggle xturn
    return true;
    public boolean checkWin(int col, int row, TttXO xo)
    boolean win = false;
    // first rows and columns
    boolean temp = true;
    for (int i = 0; i < 3; i++)
    temp &= cellGrid[row][i].getXO() == xo;
    win |= temp;
    temp = true;
    for (int i = 0; i < 3; i++)
    temp &= cellGrid[i][col].getXO() == xo;
    win |= temp;
    if (row == col) // if slash diagonal
    temp = true;
    for (int i = 0; i < 3; i++)
    temp &= cellGrid[i][i].getXO() == xo;
    win |= temp;
    if (row + col == 2) // if backslash diagonal
    temp = true;
    for (int i = 0; i < 3; i++)
    temp &= cellGrid[i][2 - i].getXO() == xo;
    win |= temp;
    return win;
    // used to test and debug the class
    public String toString()
    StringBuilder sb = new StringBuilder();
    for (int i = 0; i < cellGrid.length; i++)
    for (int j = 0; j < cellGrid[i].length; j++)
    sb.append(cellGrid[i][j] + " ");
    sb.append("\n");
    if (win)
    sb.append("win! Game over");
    else
    sb.append("No winner yet");
    return sb.toString();
    // test the class
    public static void main(String[] args)
    TttGameModel model = new TttGameModel();
    checkMove(model, 0, 0);
    checkMove(model, 1, 0);
    checkMove(model, 1, 1);
    checkMove(model, 2, 0);
    checkMove(model, 1, 0); // bad move
    checkMove(model, 2, 2);
    // to test the class
    private static void checkMove(TttGameModel model, int i, int j)
    System.out.println("OK move: " + model.takeTurn(i, j));
    System.out.println(model + "\n");

  • HT204146 Good morning.  I just purchased Imatch but cannot download my music from an iphone 5 to IMatch in Icloud.  Can you help me with this?

    Good morning.  I just purchased Imatch but cannot download my music from an iphone 5 to IMatch in Icloud.  Can you help me with this?

    Hi
    Has iTunes completed its scan of your iTunes library on your computer Subscribing to iTunes from an iOS device.
    Jim

  • Can you sign in with more than one apple id on an iPad?

    Can you sign in with more than one apple id on an iPad?

    Only one account can be signed in at a time (via Settings > Store), and if you turn on automatic downloads and/or download past purchases from an account then you risk tying the iPad to that account for 90 days : http://support.apple.com/kb/HT4627

  • I am using Dreamweaver CS4  and can no longer connect to Device Central - Can you help me with this?

    I am using Dreamweaver CS4  and can no longer connect to Device Central - Can you help me with this?

    Device Central was discontinued April 23, 2012.
    http://www.adobe.com/products/devicecentral.html
    And replaced with Adobe Edge Inspect CC (for Cloud subscribers)
    http://html.adobe.com/edge/inspect/
    Nancy O.

Maybe you are looking for

  • PDF content disposition on IE

    Hi, I am having difficulties in displaying PDF content from JSP. Obviously URL ends with mypdffile.jsp. From the JSP, I set attributes as follows. It works as intended on Firefox. Not on IE; response.setContentType("application/pdf;charset=UTF-8"); r

  • Mapping XML data to relational database tables

    I'm writing an application that has two parts: the client part generates XML documents and sends them across the network to a server part, which parses the XML, maps the XML to various RDBMS tables and stores the data in the RDBMS. I've got everythin

  • Adding a route in solaris

    I added a route in solaris by command--> route add 10.224.86.10 -netmask 255.255.255.224 10.224.8.10 it gave the prompt--add net 10.224.56.0: gateway 10.224.8.10 I checked the routing table by netstat -r 10.224.86.10 10.224.8.10 UG 1 0 which shows th

  • Does Imovie have the same features on an Ipad2 as it does on an Imac?

    i need to upload videos from the internet, clip them, add my own videos, in order to make the movie omplete. Can i do this on an ipad2 with Imovie, or do i need to use an IMac?

  • Switchover using dgmgrl throwing ORA-12514: TNS:listener does not

    Hi, oracle version : 11.1.0.7 os : sun soalris i am able to switchover the roles of primary and standby but i am getting this error DGMGRL> switchover to qecgpoca; Performing switchover NOW, please wait... New primary database "qecgpoca" is opening..