Hi everyone.

Ive finally figured out how to get my JOptionPane always on top no matter what but i cant figure out how to get the results
of what button the user has clicked? and how to disable the x on the top left corner?

This is what I have. Any insight would be appreciated.

  JOptionPane op = new JOptionPane("paused",JOptionPane.INFORMATION_MESSAGE,JOptionPane.OK_CANCEL_OPTION,null,new String[]{"Restart","Shutdown"},"default");
JDialog dialog = op.createDialog("Interferance Detected");
dialog.setAlwaysOnTop(true);
dialog.setModal(true);
dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
dialog.setVisible(true);

A quick look at the documentation suggest to me that there is a getInputValue() function that you might want to look at.

I hope you can figure it out!

There's a complete example in the introductory description in the standard API documentation

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.