I want to make JOptionPane.showMessageDialog
message appear
- Any place in the screen.
- Relative to JFrame. (not at the centre of the JFrame)
For example this will display the message at the centre of the JFrame provided as argument thisFrame
JOptionPane.showMessageDialog(thisFrame, "Your message.");
And this will display the message at the centre of the screen irrelative to any JFrame.
JOptionPane.showMessageDialog(null, "Your message.");
what I want is to set the location of the message any place I want
what I want is to set the location of the message relative to the JFrame (not at the centre of the JFrame)
How?
JOptionPane
can use anyComponent
as parent. That means, it can be relatice to the forame, any component inside it, any component any in/any floating window (tool-bar,JWindow
,JDialog
) that is on-screen) or of course,null
(center of screen).