Date: Fri, 30 Jun 2000 09:23:31 -0300 (ADT) From: Theo Bell <freebsd@cfdnet.me.tuns.ca> To: Pran Joseph <pran@procsys.com> Cc: freebsd-java@FreeBSD.ORG Subject: Re: Applet and Window Managers Message-ID: <Pine.BSF.4.10.10006300918410.20176-100000@cfdnet.me.tuns.ca> In-Reply-To: <395C7CEF.C31B0487@procsys.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi,
I use jdk1.1.8 as well on FreeBSD 3.4. I also have a java applet. I have
never experienced your problems but in my Java code (which I inherited
from a previous developer) there are references to a "java bug" to do with
pack();
The code I have calls pack in a loop and packs until the bounds stop
changing. I have no idea if this is related to your problem, but I just
thought I suggest it. I have included a few lines of my code for
reference.
Theo Bell
CFDnet.com
------------------------------------------------------------------------
/* because of a java bug, pack until the getBounds() stop changing... */
setResizable(true);
Rectangle r;
do {
r=getBounds();
pack();
}
while(!(r.equals(getBounds())));
setResizable(false);
show();
-----------------------------------------------------------------------------
On Fri, 30 Jun 2000, Pran Joseph wrote:
> 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
>
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?Pine.BSF.4.10.10006300918410.20176-100000>
