public RPChatClientDialog(String title, Window parent) { super(parent, title, ModalityType.MODELESS); this.setIconImage(UIRes.getIcon()); this.init(); this.setSize(faceSize); Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); this.setLocation( (int) (screenSize.width - faceSize.getWidth()) / 2, (int) (screenSize.height - faceSize.getHeight()) / 2); this.setResizable(false); setVisible(true); this.pack(); }
public RPRippledMemoDialog( String text, Window parent, String address, String message, WalletItem item) { super( parent, text + (item == null ? (address == null ? "" : "(" + address + ")") : "(" + item.getPublicKey() + ")"), Dialog.ModalityType.DOCUMENT_MODAL); if (item == null) { this._address = address; } else { this._address = item.getPublicKey(); } this._message = message; this._item = item; this.addWindowListener(HelperWindow.get()); setIconImage(UIRes.getIcon()); this.setResizable(false); Dimension dim = new Dimension(518, 580); this.setPreferredSize(dim); this.setSize(dim); this.initComponents(); }