I am such an idiot!!!!!!!!!!!!!
Type: Posts; User: keepStriving
I am such an idiot!!!!!!!!!!!!!
In second code:
The new thread and run method is meant to allow multithreading which it does as I can do sysTrayCreator() and connectSocket() though I slow down sysTrayCreator() so exception can be...
Which is why I used multithreading. It seems to work or am I going wrong somewhere again?
Turn out shutdown hook does not work for forceful exits, though I managed to get it to work for graceful exits ad understand it now.
I have managed to do the task with sockets here is the code,...
I still can't get the display, though also get mixed results with the file still not being deleted. I have changed the code from my last attempt. The program does not stop and keeps running.
...
I have moved what you mentioned from run method though file does not delete upon forceful exit of program though recognises to shut program if another program is already running. Also icon still not...
I've tried it though I get an illegal state exception though the program continues running, this is how I implemented it.
import java.awt.AWTException;
import java.awt.Image;
import...
Oh I get you, my file method only works if the user gracefully exits. Is there some sort of method which I can force before the exit so I can delete the file once again upon a forceful exit by the...
No, I'll stick with file method.
The first system tray keeps running and I get an output that there is already one running so can't open the second, though get no icon appears.
--- Update ---
I tried it and it shows the...
Another way I've used:
Check if certain file exists, if already created then can't use system tray, if file has not created then create and run system tray, when exiting system tray delete file.
...
Is there any way I can check if a system tray already exists as at the moment If I keep clicking the Jar file to create a system tray then multiple occurrences appear, which means multiple programs...