public class PopupFactory extends Object
PopupFactory ,顾名思义,用于获取Popup的Popup 。 
       Popup s的用于显示Component上述所有其他Component中特定包含层次结构秒。 
       一般的合同是,一旦你已经获得了Popup从PopupFactory ,您必须调用hide上Popup 。 
       典型用法是: 
         PopupFactory factory = PopupFactory.getSharedInstance();
   Popup popup = factory.getPopup(owner, contents, x, y);
   popup.show();
   ...
   popup.hide();  
      Popup 
       | Constructor and Description | 
|---|
| PopupFactory() | 
| Modifier and Type | Method and Description | 
|---|---|
| Popup | getPopup(Component owner, Component contents, int x, int y)
              创建 
              Popup为组件owner包含Componentcontents。 | 
| static PopupFactory | getSharedInstance()
              返回共享的 
              PopupFactory,可用于获取Popups。 | 
| static void | setSharedInstance(PopupFactory factory)
              设置 
              PopupFactory将被用于获取Popup秒。 | 
public static void setSharedInstance(PopupFactory factory)
PopupFactory将被用于获取Popup秒。 
           如果factory为空,则会抛出IllegalArgumentException 。 
          factory - 共享PopupFactory 
           IllegalArgumentException - 如果 
            factory为空 
           getPopup(java.awt.Component, java.awt.Component, int, int) 
           public static PopupFactory getSharedInstance()
PopupFactory ,可用于获取 
           Popup s。 
          public Popup getPopup(Component owner, Component contents, int x, int y) throws IllegalArgumentException
Popup为组件owner包含Component contents 。 
           owner用于确定哪些Window将新增Popup将母公司Component Popup创建。 
           null owner意味着没有有效的父项。 
           x和y指定放置Popup的首选初始位置。 
           根据屏幕尺寸或其他参数, Popup可能不会显示在x和y 。 
          owner - 组件鼠标坐标是相对的,可以是null 
           contents - 弹出窗口的内容 
           x - 初始x屏幕坐标 
           y - 初始y屏幕坐标 
           IllegalArgumentException - if contents is null 
            Submit a bug or feature 
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
 Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.