Problem with printhead

My printer just recently stopped working and displays the following error message when I turn it on:  There's a red and white x followed by " Problem with printhead" and on the next line "There is a problem with the printhead." I have tried cleaning the printhead, aligning the printhead and cleaning page smears but none of that worked. It's brand new and been printing perfectly until now. Please help. 

Hello @Saheb-e-Alam,
Welcome to the HP Support Forums! I see you recently purchased an HP Officejet 6830, and you are getting a 'Printhead problem' error message.
Please call our technical support at 800-474-6836. If you live outside the US/Canada Region, please click the link below to get the support number for your region.
http://www8.hp.com/us/en/contact-hp/ww-phone-assist.html
I hope this helps!
Thanks,
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!

Similar Messages

  • Screen says problem with printhead

    The printer screen says problem with printhead. I tried the trouble shooting directions, and it did not work. several colors may be almost out of ink...is that an issue? i need my printer!! Help!

    ¡ Hi !, Penguin1: Please, see the manual/guide, for ... h10032.www1.hp.com/ctg/Manual/c04365944.pdf

  • HP Officejet Pro 8600 "Problem with Printer or Ink System'

    A gander at this forum suggests I am one ofa multitude of people perplexed by this issue. There is a notation beside one enquiry which says 'Problem Solved'.... well it isn't for me. My printer (typical!) is one month out of warranty. I had to replace the black cartridge and, when I did, it came up with this error prompt. I then replaced all the other cartridges. HP suggests removing the printhead and following that they say place it 'upside down on a clean sheet of paper'... NO instructions for cleaning it!! When it is replaced in the printer they suggest you 'rock the printhead left and right to make sure that the printhead fully seats in the carriage' and if THIS doesn't fix things 'try reseating the printhead up to 3 times'... This in itself is an admission of an 'issue' with this product. It doesn't sound like a very scientific engineering 'fix' to me!
    A new printhead costs almost what we paid for the printer a year ago. I hate consigning anything to landfill that I can avoid... unfortunately it looks like that is where this unit belongs...

    Hi @Robin_Perth,
    Welcome to the HP Forums!
    I am sorry to hear about you getting the problem with printer or ink system error, with your HP Officejet 8600, but I am happy to look into this for you!
    I am assuming you have already been through this guide, A 'Problem with Ink System' Error Message Displays on the Control Panel or Computer During Setup.
    If this guide does not resolve the issue, please call our technical support at 800-474-6836. If you live outside the US/Canada Region, please click the link below to get the support number for your region. Country-language selector.
    This guide, Limited Warranty for HP Ink Cartridges and Customer-Replaceable Printheads for HP Inkjet Supplies, will help you to determine if your printhead is still in warranty or not.
    Hope this helps!
    RnRMusicMan
    I work on behalf of HP
    Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos Thumbs Up" to say “Thanks” for helping!

  • Printer problems with Officejet Pro 8500 A910

    Dear all,
    I have been given as a present an Officejet Pro 8500 A910 (serie number CN16LDM020 and product number CM756A). The people whom I have got it from already had some problems with the printer heads. I have accepted the printer, because I want to have it working again. I do encounter some problems however. I hope you kind people on the forum can help me out and get this thing working again. As a side note: I am only interested in using the scanner, printer (only black and white - I do not print in colour) and e-printing (I understand that it is possible to email documents to printer, so that they are printed whilst you are somewhere else). 
    Upon installation I have conneted the internet to my wi-fi. Upon installation it made some test prints, whereby the black dots were good, but the cyan and other colours were not. When I now turn off the installed printer and switch it on again it takes the printer about 5 - 7 minutes to initialize. On the touch screen of the printer it is said "Checking printer, this might take 5 minutes", "Checking printheads", "Aligning printheads" and alike notifications. After 5 - 7 minutes the printer gives the following notification: " Failure notice. Alignment failed. Refer to device documentation for details." When I then push the question mark on the touch screen the following notidication is given: " Alignment failed. Check printer quality of the current print job. If it is not satisfactory, try aligning the printer to see if that improves the quality. To align the printhead again, touch (home), touch (arrow right), touch Tools, and then touch Align Printhead." When I follow these instructions, the same thing happens. I have tried the option "Clean printheads" under "Tools". The test prints that come out are again good in black and white and not good in colour. 
    The ink level of the cartridges is very low for Yellow, Magenta and Cyan. For Black the printer gives a question mark. The expiry date of the cartridges is in 2015. The information on the Self Test Diagnostic Page (you get when you print a report from checking the ink cartridges) gives the following status:
    Printhead status
    Printhead health: Good (for both Black/Yellow and Magenta/Cyan)
    Serial: 7735960 (Black/Yellow) and 7744345 (Magenta/Cyan)
    End of warranty: mid-2013
    Accumulated ink usage (ml): Black 99/Yellow 71, Magenta 57/Cyan 58
    Refilled supply:
    Detected in printhead/printer? For all cartidges "yes".
    When I try to print a document from Word on my MacBook (which runs on Mac OS X 10.6.8) and the printer is on stand-by, Word recognizes the printer, starts with the print order but then comes with the notifications "Printer offline" and "Cannot find printer" and postpones the print order. Today I reset the printer and the print job that I had before the reset (which was postponed) came out. 
    Today, I printed a document whilst the printer was not on stand-by (the touch screen was on home menu) and the print was well (it was only black and white). After the print, the printer also made a print report. Again, the colour was bad, but black ink was good. After that print report, the printer started aligning again. After 5 minutes it gave the above-mentioned failure notice (" Failure notice. Alignment failed. Refer to device documentation for details."). 
    I would assume that the first thing that I should do is get new cartridges. However, since I only print black and white, can't I just buy the Black Ink and disable the other cartridges? Then, I am thinking of not buying HP cartridges (since the warranty term is already over). What cartridges do you reccomend (price-quality)? If  new cartridges are installed (previous owner had same problems with full cartridges) and the problems (with print heads) are not solved, what should I do? 
    On a second note, I want to use the option of printing online. In other words, give a print order on my Iphone to the printer so that it starts printing at home. How do I set this up? How can I test this?
    I would be very obliged with your feedback on the above. 
    Kind regards,
    Onno

    Hey Onno,
    I see you have several items listed about your Officejet Pro 8500a (A910 series) printer.  The main issue that stands out is the print quality issue.  I would advise starting here with your printer.  
    From your information I can see that refill or remanufacture cartridges have been used in this printer at some point.  It is possible that the ink from these cartridges have damaged the internal ink system of the printer.  If you have performed all the troubleshooting steps for the print quality issue you are experiencing, then the next step is going to be replacing the printheads of the unit.
    Troubleshooting Print Quality Issues
    The 8500a requires all cartridges be available even if you are simply printing in B&W.  If the cartridges are low, then you will have to replace the cartridges as needed.  Typically by the design of this printer, however, print quality issues do not follow ink levels in the cartridges as ink is piped to the internal printheads, thus even with empty cartridges there is some ink remaining in the system.
    The printheads for the 8500a can be found at most HP certified retailers if you decide to attempt replacing them as a step towards resolving the issue.  As to the cartridges, I would advise using genuine HP cartridges as HP ink is designed with HP printers in mind.  For information about refilled/remanufactured cartridges please click here.
    Hope this helps in getting the print quality issue alleviated,
    Jason
    -------------How do I give Kudos? | How do I mark a post as Solved? --------------------------------------------------------
    I am not an HP employee.

  • There is a problem with the printer or ink system.

    Will not print. Turn it off then back on; will print one document, but not the last page. Try printing only the last page, but will not print. Will not print one page documents at all. Will not print more than one document without repeating this process.
    First Error message: "There is a problem with the printer or ink system. Turn the printer off, then on. If you continue to get this message, contact HP." Out of warranty.
    Tried this page: http://support.hp.com/us-en/document/c03081973
    Which led me to this page: http://support.hp.com/us-en/document/c03262508
    Now that the ink cartridges are removed as instructed, the carriage will not return to the center of the access area.

    Hey @KennyBee51,
    Thanks again for getting back to me regarding this issue.
    I would have to agree that the HP Officejets Printhead system is defective. I would recommend at this time that you contact our Technical Support queue by phone to explore additional hardware options.
    HP Technical Support can be reached at: 800-474-6836.
    If you live outside the US/Canada Region, please click the link below to get the support number for your region.
    HP Worldwide Contact
    It has been a pleasure working with you. I wish you luck going forward with this!
    X-23
    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" on the right to say "Thanks" for helping!

  • Problem with ink cartridges

    We have a fairly new (6 mo.) HP 6100 printer that quit working, indicating a problem with the cartridges. I purchased all new ink cartridges, matching the number posted inside the printer door (933 for CMY and 932 for K). The printer still doesn't work, giving the message "The printhead appears to be missing, not detected, incorrectly installed or incompatible." I have removed, cleaned, re-installed. Still nothing.

    Hi Bigs4Kids,
    I understand you have an Officejet 6100 that is telling you the printhead appears to be missing or damaged. I'm sorry to hear this, but I will do my best to assist you.
    As this printer does not have a removable printhead, I'm not entirely sure what you removed and cleaned, but I would suggest that you call HP Tech Support and inquire about getting the printer serviced, as stated in this A 'Missing or Failed Printhead' Error Message Displays on the Printer or on the Computer document.
    Hope this helps, have a great weekend!
    Please click “Accept as Solution ” if you feel my post resolved your issue, as it will help others find the solution faster
    Click the “Kudos Thumbs Up" on the right to say “Thanks” for helping!
    **MissTeriLynn**
    I work on behalf of HP

  • 8900 printer changed black cart. error code problem with printer system

    Changed black cartridge in 8900 series all in one printer error message says trouble with print system call HP.  Have removed and reinstalled catridge still same error message. HELP!!!!!

    Hi @melvinc 
    Welcome to the forums
    I read about the issue you are facing on your printer, as it's now showing a problem with the ink system. I cannot locate a "8900" printer, could you possibly have the Officejet 8600? If so, please try out the steps from the guide below. If you reach a step where it asks to replace the printhead or printer, call us directly to see what your replacement options are with HP.
    A 'Problem with Ink System' Error Message Displays on the Control Panel or Computer During Setup
    Please call our technical support at 800-474-6836. If you live outside the US/Canada Region, please click the link below to get the support number for your region. http://www8.hp.com/us/en/contact-hp/ww-phone-assis​t.html
    Have a great day
    R a i n b o w 7000I work on behalf of HP
    Click the “Kudos Thumbs Up" at the bottom of this post to say
    “Thanks” for helping!
    Click “Accept as Solution” if you feel my post solved your issue, it will help others find the solution!

  • Cp1700 - Any problems with switching existing printer with stored printer?

    I am having problems reading the LCD panel for my cp1700 (not all the text shows - common problem). I have another cp1700 that I have had stored for about 5 years (saving for parts. I think this "stored" printer squeaked when printing). I considered switching the LCD panels but it looks as if this is a complicated procedure. So I am wondering if I will encounter any problems with switching the printers? I will be putting in new ink cartridges but wondering if the printheads will cause a problem after being stored for so long?

    This don't completely resolve your concerns, but I've had no trouble printing from OS X 10.7 to an Epson Artisan 810 connected to a Mac running OS X 10.6.8.  I may even have been able to print to it wirelessly, but I can't remember.  Apple issued an update to the Epson printer drivers fairly recently, which one would hope would have addressed any issues.  In any case, I'd make a bootable clone of your Mac before you upgrade.  If things aren't as you hope, then you can restore the clone to your main disk drive and be back with OS X 10.6.

  • Different problems with hp B8550

    Hi, I have some problems with my b8550.
    -I tried many time to install drivers in windows 7 but evertime there is a fatal error and is impossible to fix it.
    -After that I can use Hp photosmart software BUT it's imppossible to clean the headprints. If I choise "clean printhead" i have to wait a lot of time but nothing happen. After that the product print a page but the printhead is not clean.
    -I tried to clean printhead with my mac but I have the same problem. The product stay a lot of time witouth cleaning.
    -The product often turn off themself. I follow the instructions here but the problem is the same.
    What I have to do? To throw the print on the garbage or I have some chance to repair it? 

    Hello again piervincenzo,
    Typically when you have issues with the printer not aligning or finishing a cleaning process, it's because of a power issue or a lack there of.
    Please make sure that you have the printer power cable connected directly to a wall outlet and not a power bar/strip. Here is a document that uses a LaserJet printer as an example but it is meant for HP products in general. Please click on the following link that explains the Issues when Connected to an Uninterruptible Power Supply/Power Strip/Surge Protector.
    Once the printer is connected to a wall outlet, please power cycle the unit with the use of the ON/OFF button.  This will perform a semi power reset on the unit.
    If the troubleshooting does not help resolve your issue, I would then suggest calling HP's Technical Support to see about further options for you. If you are calling within North America, the number is 1-800-474-6836 and for all other regions, click here: click here.
    Thanks again for your time.
    Click the “Kudos Thumbs Up" at the bottom of this post to say “Thanks” for helping!
    Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
    W a t e r b o y 71
    I work on behalf of HP

  • Proablem with printhead

    I did all that was suggested by HP and the final answer was that there was a problem with the printhead.  I also  checked to see if my printer was still under warranty and it is.  Now what do I do with regard to repairs?

    Hello,  Its unfortunate to see this error on a new pritner. Did the error show up while you were setting up the printer for the first time, before installing ink ? (Yes/No)Did the error show up while you were setting up the printer for the first time, After installing ink ? (Yes/No)May i know if you had printed few pages before the error showed up ? ( Yes/ No)Did the error show up as soon as you powered on the printer ? ( Yes / No ) However, please call HP Tech Support for further assistance. 

  • Help with printhead issues

    I have completed all the recommended steps to fix my 'printhead' error, but it still has not fixed the problem with my printer

    I would advise calling HP phone support as it's likely you'll require a replacement printer under warranty. Can you please let us know how you get on? ThanksCiara 

  • A problem with threads

    I am trying to implement some kind of a server listening for requests. The listener part of the app, is a daemon thread that listens for connections and instantiates a handling daemon thread once it gets some. However, my problem is that i must be able to kill the listening thread at the user's will (say via a sto button). I have done this via the Sun's proposed way, by testing a boolean flag in the loop, which is set to false when i wish to kill the thread. The problem with this thing is the following...
    Once the thread starts excecuting, it will test the flag, find it true and enter the loop. At some point it will LOCK on the server socket waiting for connection. Unless some client actually connects, it will keep on listening indefinatelly whithought ever bothering to check for the flag again (no matter how many times you set the damn thing to false).
    My question is this: Is there any real, non-theoretical, applied way to stop thread in java safely?
    Thank you in advance,
    Lefty

    This was one solution from the socket programming forum, have you tried this??
    public Thread MyThread extends Thread{
         boolean active = true;          
         public void run(){
              ss.setSoTimeout(90);               
              while (active){                   
                   try{                       
                        serverSocket = ss.accept();
                   catch (SocketTimeoutException ste){
                   // do nothing                   
         // interrupt thread           
         public void deactivate(){               
              active = false;
              // you gotta sleep for a time longer than the               
              // accept() timeout to make sure that timeout is finished.               
              try{
                   sleep(91);               
              }catch (InterruptedException ie){            
              interrupt();
    }

  • Problem with Threads and a static variable

    I have a problem with the code below. I am yet to make sure that I understand the problem. Correct me if I am wrong please.
    Code functionality:
    A timer calls SetState every second. It sets the state and sets boolean variable "changed" to true. Then notifies a main process thread to check if the state changed to send a message.
    The problem as far I understand is:
    Assume the timer Thread calls SetState twice before the main process Thread runs. As a result, "changed" is set to true twice. However, since the main process is blocked twice during the two calls to SetState, when it runs it would have the two SetState timer threads blocked on its synchronized body. It will pass the first one, send the message and set "changed" to false since it was true. Now, it will pass the second thread, but here is the problem, "changed" is already set to false. As a result, it won't send the message even though it is supposed to.
    Would you please let me know if my understanding is correct? If so, what would you propose to resolve the problem? Should I call wait some other or should I notify in a different way?
    Thanks,
    B.D.
    Code:
    private static volatile boolean bChanged = false;
    private static Thread objMainProcess;
       protected static void Init(){
            objMainProcess = new Thread() {
                public void run() {
                    while( objMainProcess == Thread.currentThread() ) {
                       GetState();
            objMainProcess.setDaemon( true );
            objMainProcess.start();
        public static void initStatusTimer(){
            if(objTimer == null)
                 objTimer = new javax.swing.Timer( 1000, new java.awt.event.ActionListener(){
                    public void actionPerformed( java.awt.event.ActionEvent evt){
                              SetState();
        private static void SetState(){
            if( objMainProcess == null ) return;
            synchronized( objMainProcess ) {
                bChanged = true;
                try{
                    objMainProcess.notify();
                }catch( IllegalMonitorStateException e ) {}
        private static boolean GetState() {
            if( objMainProcess == null ) return false;
            synchronized( objMainProcess ) {
                if( bChanged) {
                    SendMessage();
                    bChanged = false;
                    return true;
                try {
                    objMainProcess.wait();
                }catch( InterruptedException e ) {}
                return false;
        }

    Thanks DrClap for your reply. Everything you said is right. It is not easy to make them alternate since SetState() could be called from different places where the state could be anything else but a status message. Like a GREETING message for example. It is a handshaking message but not a status message.
    Again as you said, There is a reason I can't call sendMessage() inside setState().
    The only way I was able to do it is by having a counter of the number of notifies that have been called. Every time notify() is called a counter is incremented. Now instead of just checking if "changed" flag is true, I also check if notify counter is greater than zero. If both true, I send the message. If "changed" flag is false, I check again if the notify counter is greater than zero, I send the message. This way it works, but it is kind of a patch than a good design fix. I am yet to find a good solution.
    Thanks,
    B.D.

  • Problem with threads running javaw

    Hi,
    Having a problem with multi thread programming using client server sockets. The program works find when starting the the application in a console using java muti.java , but when using javaw multi.java the program doesnt die and have to kill it in the task manager. The program doesnt display any of my gui error messages either when the server disconnect the client. all works find in a console. any advice on this as I havent been able to understand why this is happening? any comment would be appreciated.
    troy.

    troy,
    Try and post a minimum code sample of your app which
    does not work.
    When using javaw, make sure you redirect the standard
    error and standard output streams to file.
    Graeme.Hi Graeme,
    I dont understand what you mean by redirection to file? some of my code below.
    The code works fine under a console, code is supposed to exit when the client (the other server )disconnects. the problem is that but the clientworker side of the code still works. which under console it doesnt.
    public class Server{
    ServerSocket aServerSocket;
    Socket dianosticsSocket;
    Socket nPortExpress;
    ClientListener aClientListener;
    LinkedList queue = new LinkedList();
    int port = 0;
    int clientPort = 0;
    String clientName = null;
    boolean serverAlive = true;
    * Server constructor generates a server
    * Socket and then starts a client threads.
    * @param aPort      socket port of local machine.
    public Server(int aPort, String aClientName, int aClientPort){
    port = aPort;
    clientName = aClientName;
    clientPort = aClientPort;
    try{
    // create a new thread
    aServerSocket = new ServerSocket(port) ;
    // connect to the nPortExpress
    aClientListener = new ClientListener(InetAddress.getByName(clientName), clientPort, queue,this);
    // aClientListener.setDaemon(true);
    aClientListener.start();
    // start a dianostic port
    DiagnosticsServer aDiagnosticsServer = new DiagnosticsServer(port,queue,aClientListener);
    // System.out.println("Server is running on port " + port + "...");
    // System.out.println("Connect to nPort");
    catch(Exception e)
    // System.out.println("ERROR: Server port " + port + " not available");
    JOptionPane.showMessageDialog(null, (e.toString()),"ERROR: Server port " + port + " not available", JOptionPane.ERROR_MESSAGE);
    serverAlive = false;
    System.exit(1);
    while(serverAlive&&aClientListener.hostSocket.isConnected()){
    try{
    // connect the client
    Socket aClient = aServerSocket.accept();
    //System.out.println("open client connection");
    //System.out.println("client local: "+ aClient.getLocalAddress().toString());
    // System.out.println("client localport: "+ aClient.getLocalPort());
    // System.out.println("client : "+ aClient.getInetAddress().toString());
    // System.out.println("client port: "+ aClient.getLocalPort());
    // make a new client thread
    ClientWorker clientThread = new ClientWorker(aClient, queue, aClientListener, false);
    // start thread
    clientThread.start();
    catch(Exception e)
    //System.out.println("ERROR: Client connection failure");
    JOptionPane.showMessageDialog(null, (e.toString()),"ERROR: Client connection failure", JOptionPane.ERROR_MESSAGE);
    }// end while
    } // end constructor Server
    void serverExit(){
         JOptionPane.showMessageDialog(null, "Server ","ERROR: nPort Failure", JOptionPane.ERROR_MESSAGE);
         System.exit(1);
    }// end class Server
    *** connect to another server
    public class ClientListener extends Thread{
    InetAddress hostName;
    int hostPort;
    Socket hostSocket;
    BufferedReader in;
    PrintWriter out;
    boolean loggedIn;
    LinkedList queue;      // reference to Server queue
    Server serverRef; // reference to main server
    * ClientListener connects to the host server.
    * @param aHostName is the name of the host eg server name or IP address.
    * @param aHostPort is a port number of the host.
    * @param aLoginName is the users login name.
    public ClientListener(InetAddress aHostName, int aHostPort,LinkedList aQueue,Server aServer)      // reference to Server queue)
    hostName = aHostName;
    hostPort = aHostPort;
    queue = aQueue;
    serverRef = aServer;      
    // connect to the server
    try{
    hostSocket = new Socket(hostName, hostPort);
    catch(IOException e){
    //System.out.println("ERROR: Connection Host Failed");
    JOptionPane.showMessageDialog(null, (e.toString()),"ERROR: Connection to nPort Failed", JOptionPane.ERROR_MESSAGE);     
    System.exit(0);
    } // end constructor ClientListener
    ** multi client connection server
    ClientWorker(Socket aSocket,LinkedList aQueue, ClientListener aClientListener, boolean diagnostics){
    queue = aQueue;
    addToQueue(this);
    client = aSocket;
    clientRef = aClientListener;
    aDiagnostic = diagnostics;
    } // end constructor ClientWorker
    * run method is the main loop of the server program
    * in change of handle new client connection as well
    * as handle all messages and errors.
    public void run(){
    boolean alive = true;
    String aSubString = "";
    in = null;
    out = null;
    loginName = "";
    loggedIn = false;
    while (alive && client.isConnected()&& clientRef.hostSocket.isConnected()){
    try{
    in = new BufferedReader(new InputStreamReader(client.getInputStream()));
    out = new PrintWriter(new OutputStreamWriter(client.getOutputStream()));
    if(aDiagnostic){
    out.println("WELCOME to diagnostics");
    broadCastDia("Connect : diagnostics "+client.getInetAddress().toString());
    out.flush();
    else {       
    out.println("WELCOME to Troy's Server");
    broadCastDia("Connect : client "+client.getInetAddress().toString());
         out.flush();
    String line;
    while(((line = in.readLine())!= null)){
    StringTokenizer aStringToken = new StringTokenizer(line, " ");
    if(!aDiagnostic){
    broadCastDia(line);
    clientRef.sendMessage(line); // send mesage out to netExpress
    out.println(line);
    out.flush();
    else{
    if(line.equals("GETIPS"))
    getIPs();
    else{
    clientRef.sendMessage(line); // send mesage out to netExpress
    out.println(line);
    out.flush();
    } // end while
    catch(Exception e){
    // System.out.println("ERROR:Client Connection reset");
                             JOptionPane.showMessageDialog(null, (e.toString()),"ERROR:Client Connection reset", JOptionPane.ERROR_MESSAGE);     
    try{
    if(aDiagnostic){
    broadCastDia("Disconnect : diagnostics "+client.getInetAddress().toString());
    out.flush();
    else {       
    broadCastDia("Disconnect : client "+client.getInetAddress().toString());
         out.flush();
    // close the buffers and connection;
    in.close();
    out.close();
    client.close();
    // System.out.println("out");
    // remove from list
    removeThreadQueue(this);
    alive = false;
    catch(Exception e){
    // System.out.println("ERROR: Client Connection reset failure");
    JOptionPane.showMessageDialog(null, (e.toString()),"ERROR: Client Connection reset failure", JOptionPane.ERROR_MESSAGE);     
    }// end while
    } // end method run
    * method run - Generates io stream for communicating with the server and
    * starts the client gui. Run also parses the input commands from the server.
    public void run(){
    boolean alive = true;
    try{
    // begin to life the gui
    // aGuiClient = new ClientGui(hostName.getHostName(), hostPort, loginName, this);
    // aGuiClient.show();
    in = new BufferedReader(new InputStreamReader(hostSocket.getInputStream()));
    out = new PrintWriter(new OutputStreamWriter(hostSocket.getOutputStream()));
    while (alive && hostSocket.isConnected()){
    String line;
    while(((line = in.readLine())!= null)){
    System.out.println(line);
    broadCast(line);
    } // end while
    } // end while
    catch(Exception e){
    //     System.out.println("ERRORa Connection to host reset");
    JOptionPane.showMessageDialog(null, (e.toString()),"ERROR: Connection to nPort reset", JOptionPane.ERROR_MESSAGE);
    try{
    hostSocket.close();
         }catch(Exception a){
         JOptionPane.showMessageDialog(null, (a.toString()),"ERROR: Exception", JOptionPane.ERROR_MESSAGE);
    alive = false;
    System.exit(1);
    } // end method run

  • Problem with threads and camera.

    Hi everybody!
    I've a problem with taking snapshot.
    I would like to display a loading screen after it take snapshot ( sometimes i
    have to wait few seconds after i took snapshot. Propably photo is being taken in time where i have to wait).
    I was trying to use threads but i didn't succeed.
    I made this code:
    display.setCurrent(perform);               
            new Thread(new Runnable(){
                public void run() {               
                    while((!performing.isShown()) && (backgroundCamera.isShown())){
                        Thread.yield();
                    notifyAll();
            }).start();
            new Thread(new Runnable(){
                public void run() {
                    try {
                        this.wait();                   
                    } catch(Exception e) {
                        exceptionHandler(e);
                    photo = camera.snapshot();                               
                    display.setCurrent(displayPhoto);
            }).start();This code is sometimes showing performing screen but sometimes no.
    I don't know why. In my opinion performing.isShown() method isn't working correctly.
    Does anyone have some idea how to use threads here?

    Hi,
    I've finally managed to work this fine.
    The code:
           Object o = new Object();
           display.setCurrent(perform);               
            new Thread(new Runnable(){
                public void run() {               
                    while(!performing.isShown()){
                        Thread.yield();
                   synchronized(o) {
                      o.notify();
            }).start();
            new Thread(new Runnable(){
                public void run() {
                    try {
                        synchronized(o) {
                           o.wait(1);
                    } catch(Exception e) {
                        exceptionHandler(e);
                    photo = camera.snapshot();                               
                    display.setCurrent(displayPhoto);
            }).start();

Maybe you are looking for