Hello!
I have a problem here. I have six classes. MathServer is a server class. It cooperates with a class MatteTal that produces mathematical numbers and calculates them. The MathServer class starts a class MathClientHandler which sends the numbers to class MathClient. In MathClientGUI you see the numbers, put in the answer and sends it back to the server. Then there is another class FileClient that you start from MathClientGUI, you choose a file from JFileChooser, this file contains rows with numbers to calculate like, 5+4=10, 7/4=1 and so forth. FileClient sends this file to MathServer that calculates and corrects the answers and sends back a file with an answer like 5+4=10(false), 7/4=1(correct) OBS! Integerdivision.
After this correction is done and the file sending procedure is completed there should be a message that says "The calculation of the sent file is completed!". And this is the problem!! I can't get this message to show up. I put it in a JOptionPane dialog box as you can see.
Here are all the classes. It is a lot of code but I don't know how to do it in another way.
MathServer:
FileClient:
I only send these two classes. If you want all six I send them as well. The problem is the while-loop in the FileClient class. Line 87. When in.readLine gets null the while loop is done and then I want the message to execute, but it doesn't. Can anyone see what I need to do? I have Swing and I have
Thread and I do not know if they in some way conquer with each other in some way?
// Anders