I am trying to launch a .exe file (made from a .jar), which at the beginning opens a UI/window and a user types multiple information in it. Later the user presses "OK" or "Cancel" and the program continues accordingly while using this information. This UI should also be visible in the taskbar.
I have managed to write a UI with the help of JPanel.
The Problem is that the window that opens may get "lost" when the user switches to other programs/browsers. This window cannot be found in Windows 10 when using alt+tab.
I am aware that in Windows 10 a UI opens in the taskbar while using JFrame.
Unfortunately, when using JFrame the rest of the code does not wait for the input of the user and continues to run. This part was solved while using the JPanel.
I am quite confused as of how to implement my code. What would be the optimal solution to my task?
- Use JFrame? If so, how to make the code to wait for the user's Input?
- Use JPanel? How to make a task icon out of it or how to make the window to pop over everything else.
- Another option??
This should be a standard procedure for many applications. I do not understand why there is not a straight forward solution for this matter. I appreciate any tip.