本文整理了Java中javax.swing.JWindow.show()
方法的一些代码示例,展示了JWindow.show()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JWindow.show()
方法的具体详情如下:
包路径:javax.swing.JWindow
类名称:JWindow
方法名:show
暂无
代码示例来源:origin: net.sf.ingenias/editor
public static JWindow showMessageWindow(String message, JWindow parent) {
JWindow jw = new JWindow(parent);
JLabel jl = new JLabel(message);
jl.setFont(new java.awt.Font("Dialog", 1, 36));
jw.getContentPane().add(jl);
Dimension d = Toolkit.getDefaultToolkit().getScreenSize();
jw.pack();
jw.setLocation(getCenter(d));
/* jw.setLocation(
d.width / 2 - jw.getSize().width / 2,
d.height / 2 - jw.getSize().height / 2);*/
jw.show();
// This line hangs swing
// jw.toFront();
return jw;
}
代码示例来源:origin: net.sf.ingenias/editor
public void show(){
Dimension d=Toolkit.getDefaultToolkit().getScreenSize();
this.pack();
this.setLocation(ingenias.editor.widget.GraphicsUtils.getCenter(this.getSize()));
super.show();
}
代码示例来源:origin: org.gosu-lang.gosu/gosu-lab
public void show()
{
pack();
/*
if( getWidth() < 400 )
{
setSize( 400, getHeight() );
}
*/
EditorUtilities.centerWindowInFrame( this, getOwner() );
super.show();
_window = EditorUtilities.getActiveWindow();
if( _window != null )
{
_window.setEnabled( false );
}
}
代码示例来源:origin: org.fudaa.framework.ctulu/ctulu-bu
f2.pack();
f2.setLocation(150,330);
f2.show();
代码示例来源:origin: javax.help/javahelp
/**
* show the window
*/
private void showPopup() {
if (currentPopup != null &&
SwingUtilities.getAncestorOfClass(JWindow.class, invoker) ==
currentPopup.getWindow()) {
setInvoker(currentPopup.getInvoker());
}
Rectangle popupBounds = computePopupBounds(getSize());
jheditor.setPreferredSize(new Dimension(popupBounds.width,
popupBounds.height));
window.setBounds(popupBounds.x, popupBounds.y,
popupBounds.width, popupBounds.height);
window.pack();
window.show();
currentPopup = this;
}
内容来源于网络,如有侵权,请联系作者删除!