61 62 private int windowType; 63 64 WindowsPopupWindow(Window parent) { 65 super(parent); 66 setFocusableWindowState(false); 67 } 68 69 void setWindowType(int type) { 70 windowType = type; 71 } 72 73 int getWindowType() { 74 return windowType; 75 } 76 77 public void update(Graphics g) { 78 paint(g); 79 } 80 81 public void hide() { 82 super.hide(); 83 /** We need to call removeNotify() here because hide() does 84 * something only if Component.visible is true. When the app 85 * frame is miniaturized, the parent frame of this frame is 86 * invisible, causing AWT to believe that this frame 87 * is invisible and causing hide() to do nothing 88 */ 89 removeNotify(); 90 } 91 92 public void show() { 93 super.show(); 94 this.pack(); 95 } 96 } | 61 62 private int windowType; 63 64 WindowsPopupWindow(Window parent) { 65 super(parent); 66 setFocusableWindowState(false); 67 } 68 69 void setWindowType(int type) { 70 windowType = type; 71 } 72 73 int getWindowType() { 74 return windowType; 75 } 76 77 public void update(Graphics g) { 78 paint(g); 79 } 80 81 @SuppressWarnings("deprecation") 82 public void hide() { 83 super.hide(); 84 /** We need to call removeNotify() here because hide() does 85 * something only if Component.visible is true. When the app 86 * frame is miniaturized, the parent frame of this frame is 87 * invisible, causing AWT to believe that this frame 88 * is invisible and causing hide() to do nothing 89 */ 90 removeNotify(); 91 } 92 93 @SuppressWarnings("deprecation") 94 public void show() { 95 super.show(); 96 this.pack(); 97 } 98 } |