Results 1 to 2 of 2
  1. #1
    michail is offline Member
    Join Date
    Dec 2009
    Rep Power

    Default can't send messages correctly [chat]

    Hi everyone.
    I have almost finished a chat application, I am using ObjectOutputStream and Input. The problem I have is when Mike writes a message it shows Mike :"the message" on Mikes screen, but on Nicks screen it shows null :"the message".
    When Nick sends a message it shows null:"Other message" on his screen and null:"other message" on Mikes screen.

    So I think it.s receiving sth wrong. Any ideas on how to get the message across correctly, with each name and message?
    I can send some code but which part?
    For a world of science and reason

  2. #2
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Rep Power


    Your best bet is to scatter debug statements around (System.out.println()) where you send and receive whatever it is yo're sending and receiving...that way you get an idea of where things are going wrong.

Similar Threads

  1. Did I do this THREAD correctly?
    By TimHuey in forum New To Java
    Replies: 4
    Last Post: 04-24-2010, 05:54 AM
  2. how to scale correctly ?
    By h9h in forum Java 2D
    Replies: 10
    Last Post: 10-29-2009, 07:06 AM
  3. Replies: 7
    Last Post: 03-28-2009, 06:20 PM
  4. How to send messages / events ??
    By Gatts79 in forum AWT / Swing
    Replies: 3
    Last Post: 11-13-2008, 05:51 PM
  5. how can server send messages every 5 min?
    By dim_ath in forum Networking
    Replies: 7
    Last Post: 01-10-2008, 03:59 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts