🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.swing
Article #11858

Re: Swing 1.1.1 JPanels inside JPanel gives error about awt.Frame

#11858
From: John Niesz
Date: Tue, 06 Apr 1999 00:00
106 lines
4437 bytes
this problem also occurs with JDK 1.2 and Swing 1.1.1.  I'm putting up with
using JDK1.1.6 for now, and go outside of JB to compile with JDK1.2 whenever i
want to.  But, to all you people at Borland, a real fix to this would be
nice!!!!

John

John Hines wrote:

> Minor correction made below:  I forgot to comment out a line!
> John Hines wrote in message <7edska$r7b4@forums.borland.com>...
> >I'm using JDK 1.2.1 and Swing 1.1.1 with all (I hope) the patches to make
> >JB2 work OK.
> >
> >Both the class below and BaseTabPanel (derived from JPanel) are java beans
> >created with the bean wizard which are part of a larger project.
> Everything
> >compiles and runs (yeah, they don't do much).
> >
> >However, as soon as I put another JPanel (see line commented out in File 1)
> >into PhoneNumberPanel and try to compile, I get the message
> >
> >"Fatal Error:  cannot access class javax.swing.JFrame; no source found;
> must
> >be compiled, because java.awt.Frame.dispose referenced by class
> >javax.swing.JFrame has changed"
> >
> >Even worse, when I delete the newly added panel in the design mode or
> >comment it out in the source codeto go back to where I previously got a
> >sucessful compile, I continue to get the same error message.  However, I
> can
> >reload code for the instant before I added the new panel to
> PhoneNumberPanel
> >and get a good compile.  Then I can put a panel into PhoneNumberPanel and
> >get the error message and .....
> >
> >Any ideas?
> >
> >John Hines john.hines@sequel.com
> >==========================File 1================================
> >package com.sequel.care.gui;
> >import java.awt.*;
> >import com.sequel.care.gui.BaseTabPanel;
> >import javax.swing.border.LineBorder;
> >import javax.swing.*;
> >
> >public class PhoneNumberPanel extends BaseTabPanel {
> >  BorderLayout borderLayout1 = new BorderLayout();
> >  private String title = "Phone Number";
> >  //javax.swing.JPanel jPanel1 = new javax.swing.JPanel();
> >
> >  public String getTitle() {  return title; }
> >
> >  void jbInit() throws Exception {
> >    this.setLayout(borderLayout1);
> >    //this.add(jPanel1, BorderLayout.CENTER);//Corrected version!
> >  }
> >
> >  public static void main(String[] args) {
> >    PhoneNumberPanel phoneNumberPanel1 = new PhoneNumberPanel();
> >    phoneNumberPanel1.invokedStandalone = true;
> >  }
> >
> >  public PhoneNumberPanel()
> >
> >        try  {      jbInit();    } catch (Exception ex)
> > ex.printStackTrace();    }
> >  }
> >
> >  public PhoneNumberPanel(BaseModel model)
> >
> >         super(model) ;   try  {   jbInit();  }  catch (Exception ex)
> > ex.printStackTrace();  }
> >  }
> >
> >  public void setTitle(String newTitle) { title = newTitle;  }
> >}
> >==========================File 2================================
> >package com.sequel.care.gui;
> >import java.awt.*;
> >import javax.swing.*;
> >public class BaseTabPanel extends JPanel
> >{
> >  BorderLayout borderLayout1 = new BorderLayout();
> >  BaseModel model;
> >  protected boolean invokedStandalone = false;
> >
> >  public BaseTabPanel( )  {
> >    super( ) ;    try  {   jbInit();   }
> >    catch (Exception ex) {  ex.printStackTrace();  }
> >  }
> >  public BaseTabPanel( BaseModel model )
> >  {
> >    super( ) ;  this.model = model;   try  {  jbInit();  }
> >    catch (Exception ex) {      ex.printStackTrace();    }
> >  }
> >  void disableAll() { }
> >  String getTitle() { return "BaseTabPanel"; }
> >  void jbInit() throws Exception {    this.setLayout(borderLayout1); }
> >  public static void main(String[] args) {
> >    BaseTabPanel baseTabPanel = new BaseTabPanel();
> >    baseTabPanel.invokedStandalone = true;
> >  }
> >}
> >
> >
Technical Details
Message-ID: <370AC6D8.A3478AA6@worldnet.att.net>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <7edska$r7b4@forums.borland.com> <7ee08k$r7715@forums.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,80591f5f47c994ad
X-Google-Attributes: gid111d45,public
From: John Niesz <sunrunner15@worldnet.att.net>
Subject: Re: Swing 1.1.1 JPanels inside JPanel gives error about awt.Frame
Date: 1999/04/06
Message-ID: <370AC6D8.A3478AA6@worldnet.att.net>
X-Deja-AN: 463485769
Content-Transfer-Encoding: 7bit
References: <7edska$r7b4@forums.borland.com> <7ee08k$r7715@forums.borland.com>
X-Accept-Language: en
Content-Type: text/plain; charset=us-ascii
Organization: Another Netscape Collabra Server User
Mime-Version: 1.0
Newsgroups: borland.public.jbuilder.java.swing