各位大虾:
请问如何让一个JDialog窗体在打开后一直是最前窗体,不会因为alt-tab什么的而隐掉
因为没有固定的父类来super()。谢谢!!
请问如何让一个JDialog窗体在打开后一直是最前窗体,不会因为alt-tab什么的而隐掉
因为没有固定的父类来super()。谢谢!!
解决方案 »
- Java:如何删除一个文件
- File 无法解析为类型
- HashMap值得问题,大家帮忙看看这段代码有没有问题
- a[]={0,1,2,3,3,3,4,4,2,5} 实现方法public String web(int a[]){} 得出数量最多的那个数
- 求助,帮忙做个题目!(产生随机数)
- java socket 这么将string转化为byte[]传输和接收
- 菜鸟问题,请大家看一看,指点一下,谢谢!
- weblogic 后台服务问题,高手帮忙?
- 请问:在JTable中如何禁止移动Column?
- 急急急急:向高手征求用JAVA实现 多叉树的算法!!!
- 大家有做JAVA图形/图像的不~~??
- 遇到一点环境变量设置的小问题!
{
super(parent, true);
// your code...
}
{
super(parent, true);
// your code...
}
这样不行啊,他只能跟注一个父窗体,可是我现在没有固定的父窗体怎么办?我的意思是这个Jdialog要一直在最前面。不会因为开别的窗体而隐到后面。还请各位帮忙,谢谢!
public void windowLostFocus(WindowEvent e){
e.getWindow().toFront();
}
});
public JDialog(Dialog owner,
String title,
boolean modal)
throws HeadlessException
Creates a modal or non-modal dialog with the specified title and the specified owner frame.
This constructor sets the component's locale property to the value returned by JComponent.getDefaultLocale.
Parameters:
owner - the non-null Dialog from which the dialog is displayed
title - the String to display in the dialog's title bar
modal - true for a modal dialog, false for one that allows other windows to be active at the same time 用模态窗口吗?
super(frame, title, modal);
initialize();//构造对话框
}
public SendAndReceiveMessageDialog() {
this(frame,"", false);
}frame是你弹出对话框的父窗体. 这个Jdialog会一直在最前面。不会因为开别的窗体而隐到后面
this(frame,"", false);
}frame这个frame为null好像也可以的.