2 // Copyright (C) 2002 Cendio Systems. All Rights Reserved.
3 // Copyright (C) 2002 Constantin Kaplinsky. All Rights Reserved.
5 // This is free software; you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation; either version 2 of the License, or
8 // (at your option) any later version.
10 // This software is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
15 // You should have received a copy of the GNU General Public License
16 // along with this software; if not, write to the Free Software
17 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
22 // ReloginPanel class implements panel with a button for logging in again,
23 // after fatal errors or disconnect
28 import java.awt.event.*;
32 // The panel which implements the Relogin button
35 class ReloginPanel extends Panel implements ActionListener {
43 public ReloginPanel(VncViewer v) {
45 setLayout(new FlowLayout(FlowLayout.CENTER));
46 reloginButton = new Button("Login again");
48 reloginButton.addActionListener(this);
49 if (viewer.inSeparateFrame) {
50 closeButton = new Button("Close window");
52 closeButton.addActionListener(this);
57 // This method is called when a button is pressed.
59 public synchronized void actionPerformed(ActionEvent evt) {
60 if (viewer.inSeparateFrame)
61 viewer.vncFrame.dispose();
62 if (evt.getSource() == reloginButton)
63 viewer.getAppletContext().showDocument(viewer.getDocumentBase());