JAVA 如果将登陆对话框,注册对话框在其父窗口中居中显示,应该如何处理?
1个回答
展开全部
public void setLocationRelativeTo(Component c)
这个方法看文档貌似可以。
If the component is not null, but it is not
currently showing, the window is placed in the center of
the target screen defined by the GraphicsConfiguration associated with this component.
If the component is not null and is shown on
the screen, then the window is located in such a way that
the center of the window coincides with the center of the
component.
这个方法看文档貌似可以。
If the component is not null, but it is not
currently showing, the window is placed in the center of
the target screen defined by the GraphicsConfiguration associated with this component.
If the component is not null and is shown on
the screen, then the window is located in such a way that
the center of the window coincides with the center of the
component.
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询