Date: Fri, 30 Jun 2000 16:26:47 +0530 From: Pran Joseph <pran@procsys.com> To: freebsd-java@freebsd.org Subject: Applet and Window Managers Message-ID: <395C7CEF.C31B0487@procsys.com>
next in thread | raw e-mail | index | archive | help
Hi,
I have feebsd 3.4 machine with jdk1.1.8 installed.
My problem is that I have a applet which runs fine in twm/After step
window manager .The same applet is not working in other managers like
KDE and GNOME .
In KDE and GNOME the applet get stuck when I try to create the
frame.Frame is extended from JFrame and contains JMenu,JTree,JPanel
etc. I am using swing 1.1.1 which I downloded from sun web site. I have
included the soucre at the end of this mail.
-Pran
public class Applet1 extends JApplet
{
boolean isStandalone = false;
MyFrame frame = null;
public String getParameter(String key, String def)
{
return isStandalone ? System.getProperty(key, def) :
(getParameter(key) != null ? getParameter(key) : def);
}
public static void main(String args[])
{
Applet1 myApplet = new Applet1();
myApplet.init();
myApplet.start();
}
//Construct the applet
public Applet1() {
}
public void init() {
try {
jbInit();
frame = new MyFrame(); //the applet is excuting till this line
frame.pack();
}
catch(Exception e) {
e.printStackTrace();
}
}
//Component initialization
private void jbInit() throws Exception {
this.setSize(new Dimension(10,10));
}
public String getAppletInfo() {
return "Test Applet";
}
public String[][] getParameterInfo() {
return null;
}
static {
try {
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
}
catch (Exception e) {}
}
public void start()
{
frame.setVisible(true);
}
}
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-java" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?395C7CEF.C31B0487>
