弹出对话框的位置如何控制? rt,就是如何把对话框放在屏幕的中央或其他指定的位置? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 共同进步,不惜血本:function onOpenWindow(){ var x = screen.width - 200; var y = 90; var vOpenWindow = window.open(url,MyWindow,"width="+x+"px,height="+y+"px,resizable=1,scrollbars=1,left="+mLeft+"px,top="+mTop+"px"); return vOpenWindow;} 有些东东,自己处理吧。 [html]<script>theDes="status:no;center:yes;help:no;minimize:yes;maximize:no;dialogWidth:350px;scroll:no;dialogHeight:200px";self.showModalDialog("http://www.sina.com.cn",null,theDes);self.showModelessDialog("http://www.lshdic.com",null,theDes);</script> [/html] 兄弟,我需要的是java版本阿-_--!!!!!!!!! //窗口居屏幕或父窗口中间,c的父窗口如果为空,则居屏幕中间 public static void centerFrame(java.awt.Component c) { Dimension ownerSize; Point ownerLocation; if (c.getParent() == null) { ownerSize = Toolkit.getDefaultToolkit().getScreenSize(); ownerLocation = new Point(0, 0); } else { ownerSize = c.getParent().getSize(); ownerLocation = c.getParent().getLocation(); if (ownerSize.height == 0 || ownerSize.width == 0 || !c.getParent().isVisible()) { ownerSize = Toolkit.getDefaultToolkit().getScreenSize(); ownerLocation = new Point(0, 0); } } //Center the window Dimension frameSize = c.getSize(); if (frameSize.height > ownerSize.height) { frameSize.height = ownerSize.height; } if (frameSize.width > ownerSize.width) { frameSize.width = ownerSize.width; } c.setLocation( ownerLocation.x + (ownerSize.width - frameSize.width) / 2, ownerLocation.y + (ownerSize.height - frameSize.height) / 2); } 问下 java怎么连接sql server2008呢 一直说驱动不匹配。 重~复~提~交~的~问~题~~~~~~~~~~~~系统都发完了 完全迷茫,一道线程 从书上抄的一段赛马的代码,可是有很多看不懂,希望大家多多指导! 视频抖动 网络编程 关于web服务器。。。。。。。 新人提问 请教关于I/O流的问题 幫幫忙吧,先謝過了!! 关于 rs.getXXX(String columnName); 在jBuilder中如何调试运行程序 如何用表显示数据库内容??
function onOpenWindow()
{
var x = screen.width - 200;
var y = 90;
var vOpenWindow = window.open(url,MyWindow,"width="+x+"px,height="+y+"px,
resizable=1,scrollbars=1,left="+mLeft+"px,top="+mTop+"px"); return vOpenWindow;
}
有些东东,自己处理吧。
<script>
theDes="status:no;center:yes;help:no;minimize:yes;maximize:no;dialogWidth:350px;scroll:no;dialogHeight:200px";
self.showModalDialog("http://www.sina.com.cn",null,theDes);
self.showModelessDialog("http://www.lshdic.com",null,theDes);
</script>
[/html]
public static void centerFrame(java.awt.Component c) {
Dimension ownerSize;
Point ownerLocation;
if (c.getParent() == null) {
ownerSize = Toolkit.getDefaultToolkit().getScreenSize();
ownerLocation = new Point(0, 0);
} else {
ownerSize = c.getParent().getSize();
ownerLocation = c.getParent().getLocation();
if (ownerSize.height == 0 || ownerSize.width == 0
|| !c.getParent().isVisible()) {
ownerSize = Toolkit.getDefaultToolkit().getScreenSize();
ownerLocation = new Point(0, 0);
}
}
//Center the window
Dimension frameSize = c.getSize();
if (frameSize.height > ownerSize.height) {
frameSize.height = ownerSize.height;
}
if (frameSize.width > ownerSize.width) {
frameSize.width = ownerSize.width;
}
c.setLocation(
ownerLocation.x + (ownerSize.width - frameSize.width) / 2,
ownerLocation.y + (ownerSize.height - frameSize.height) / 2); }