Whenever i show a JOptionPane in my Swing application i fire a beep before it like this :
Toolkit.getDefaultToolkit().beep();
JOptionPane.showMessageDialog( myFrame, "Message", "Title", JOptionPane.INFORMATION_MESSAGE );
Is there a way to apply the first line automatically to any JOptionPane in case i forgot to write it in code ?
You could create your own class which has a static method
showMessageDialogAndBeep()which callsJOptionPane.showMessageDialogand beeps before.