How to Forced Java J Frame application to run only one instance in windows? base on the image link below
[1]: https://i.stack.imgur.com/hKrNu.jpg`enter code here`
public Home() {
initialize();
}
public void mouseClicked(MouseEvent e) {
}
private void initialize() {
frame = new JFrame();
frame.getContentPane().addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) {
}
});
frame.getContentPane().setBackground(Color.DARK_GRAY);
frame.getContentPane().setLayout(null);
txtUsername = new JTextField();
txtUsername.setBorder(null);
txtUsername.setBackground(Color.DARK_GRAY);
txtUsername.setForeground(Color.WHITE);
txtUsername.addFocusListener(new FocusAdapter() {