I'm working in Fedora. I want to create a GUI in Java with two buttons: START and STOP. I have two processes: p1 and p2. When I click on START, p1 should run in the background and p2 should run in the foreground. (In the terminal, we do this by giving ./p1
and ./p2
.) When I click on STOP, both the processes should be killed. (The terminal equivalent is: CTRL+C and kill -9 pid).
Can anyone suggest the way to do this?