Before you attempt more random modifications, take a step back and consider when to create which object.

You create a ClientUI obejct in main(), which looks good.
Now take it from there.

Randomly adding code into methods that never get called will not get you any closer to a solution, only frustrate people here on the forum who could help you once you run into actual problems.

Cheers,
_