Hi Guys,
I have a problem with JOptionpan. I m using JOption pane for showing messages or even Exceptions etc. But it does not poped up on TOP.
Its always behind parent windows.
I think i need to specifiy JOptionpane to display on TOP of all windows or dialogs. But how should i do? i really dont know. Can any one tell me how it works. I past my code below.
[HTML]
import java.io.Filenam eFilter;
import javax.swing.JFr ame;
import javax.swing.JOp tionPane;
public class MessageBox extends JFrame{
private static final long serialVersionUI D = 1L;
public static void ShowMessage(Str ing message, String title,int MessageType){
JOptionPane.sho wMessageDialog( null, message, title, MessageType);
}
public static String ShowInputDialog (String message, String title,int MessageType){
return JOptionPane.sho wInputDialog(nu ll,message,titl e,MessageType);
}
}
[/HTML]
I worte this class and always use static methods of this class where ever i need to show a message or exception.
What should i do to show it always on TOP.
It would be much easier if some one send working example.
Thanks in advance
Best regard
I have a problem with JOptionpan. I m using JOption pane for showing messages or even Exceptions etc. But it does not poped up on TOP.
Its always behind parent windows.
I think i need to specifiy JOptionpane to display on TOP of all windows or dialogs. But how should i do? i really dont know. Can any one tell me how it works. I past my code below.
[HTML]
import java.io.Filenam eFilter;
import javax.swing.JFr ame;
import javax.swing.JOp tionPane;
public class MessageBox extends JFrame{
private static final long serialVersionUI D = 1L;
public static void ShowMessage(Str ing message, String title,int MessageType){
JOptionPane.sho wMessageDialog( null, message, title, MessageType);
}
public static String ShowInputDialog (String message, String title,int MessageType){
return JOptionPane.sho wInputDialog(nu ll,message,titl e,MessageType);
}
}
[/HTML]
I worte this class and always use static methods of this class where ever i need to show a message or exception.
What should i do to show it always on TOP.
It would be much easier if some one send working example.
Thanks in advance
Best regard
Comment