package com.vci.client;
|
|
import java.awt.Container;
|
import java.awt.Frame;
|
import java.net.URL;
|
|
import javax.swing.ImageIcon;
|
import javax.swing.JApplet;
|
|
import com.vci.client.logon.client.LogonAppletPanel;
|
import com.vci.client.ui.swing.VCISwingUtil;
|
|
import netscape.javascript.JSObject;
|
|
public class LogonApplet extends JApplet {
|
|
/**
|
*
|
*/
|
private static final long serialVersionUID = 5144731081715551975L;
|
|
public void init() {
|
try {
|
// NimbusLookAndFeel
|
//VCISwingUtil.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
|
//VCISwingUtil.setLookAndFeel(VCISwingUtil.LOOK_AND_FEEL_NimbusLookAndFeel);
|
VCISwingUtil.setLookAndFeel();
|
JSObject win = (JSObject) JSObject.getWindow(this);
|
URL url = getClass().getResource("/picture/login.gif");
|
LogonAppletPanel logonPanel = new LogonAppletPanel(getFrame(), 0, win, new ImageIcon(url));
|
this.setContentPane(logonPanel);
|
} catch (Exception e) {
|
e.printStackTrace();
|
}
|
}
|
|
public Frame getFrame() {
|
Container c = this.getParent();
|
while (c != null) {
|
if (c instanceof Frame) {
|
return (Frame) c;
|
}
|
c = c.getParent();
|
}
|
return null;
|
}
|
}
|