package com.vci.client.logon.client; import java.awt.Dimension; import java.awt.event.WindowEvent; import com.vci.client.ui.image.BundleImage; import com.vci.client.ui.locale.LocaleDisplay; import com.vci.client.ui.swing.components.VCIJFrame; public class LogonFrame extends VCIJFrame { /** * */ private static final long serialVersionUID = 1L; private int iTag = 0; private LogonPanel logonPanel = null; public static String userName = null; public static String groupName = null; public LogonFrame() { try { iTag = 0; logonPanel = new LogonPanel(this, iTag); init(); pack(); } catch (Exception e) { e.printStackTrace(); } } private void init() throws Exception { this.setPreferredSize(new Dimension(380, 250)); this.setIconImage ( (new BundleImage().createImageIcon ("logo.png").getImage())); this.setResizable (false); String msg = LocaleDisplay.getI18nString("rmip.framework.logon.welcome.msg", "RMIPFramework", getLocale()); this.setTitle (msg); getContentPane ().add (logonPanel); this.addWindowListener(new java.awt.event.WindowAdapter() { public void windowOpened(WindowEvent e) { logonPanel.setDefaultFocus(); } public void windowClosing(WindowEvent e) { this_windowClosing(e); } }); } private void this_windowClosing (WindowEvent e) { if (iTag == 0) { System.exit (0); } else { this.dispose (); } } }