Board index » jbuilder » Does IU Designer support inheritance?

Does IU Designer support inheritance?


2003-12-05 02:20:22 AM
jbuilder20
Hello,
I have some JInternalFrame that include the same components, like JTable,
StatusBar, ...
I have created a class like this:
public class MyInternalFrame extends JInternalFrame
{
private JPanel jPanel1 = new JPanel();
private JTable jTable1 = new JTable();
private BorderLayout borderLayout1 = new BorderLayout();
public MyInternalFrame() {
try {
jbInit();
}
catch(Exception e) {
e.printStackTrace();
}
}
private void jbInit() throws Exception {
jPanel1.setLayout(borderLayout1);
jPanel1.add(jTable1, BorderLayout.CENTER);
this.getContentPane().add(jPanel1, BorderLayout.CENTER);
}
}
And now I want to extends this class and design with JBuilder, but it is not
posible. If I extend this class like this:
public class OtherInternalFrame extends MyInternalFrame
{
public OtherInternalFrame() {
super();
}
}
When I click Design I show this message:
Failed to create live instance for variable 'this'. null
class java.lang.NullPointerException null
I created with wizard of JBuilder. What is the trouble?
 
 

Re:Does IU Designer support inheritance?

Alvaro wrote:
Quote
When I click Design I show this message:

Failed to create live instance for variable 'this'. null
class java.lang.NullPointerException null

I created with wizard of JBuilder. What is the trouble?
This has been covered about a billion times.
Read the release_notes.html file that
is in the JBuilder directory, under the
subject of Designer.
Search of the on-line JBuilder Help --
Index tab: designer, sub-topic red components.
You could also search the archives for
"red beans".
Finally, you could have gone to Joi's Faq-O-Matic
and found the answer there.
For just about any question, you should consult
the above resources first.
--
Paul Furbacher (TeamB)
Save time, search the archives:
www.borland.com/newsgroups/ngsearch.html
Is it in Joi Ellis's Faq-O-Matic?
www.visi.com/~gyles19/fom-serve/cache/1.html
Finally, please send responses to the newsgroup only.
That means, do not send email directly to me.
Thank you.
 

Re:Does IU Designer support inheritance?

After compiling your MyInternalFrame class (by adding a package
statement and the required imports), I was able to design
your OtherInternalFrame class. I suspect that your constructor for
MyInternalFrame is indeed throwing a null pointer exception.
When I inflict a null pointer exception into the MyInternalFrame's
constuctor, the designer generates the same messages that you
reported.
"Alvaro" < XXXX@XXXXX.COM >wrote in message
Quote
Hello,

I have some JInternalFrame that include the same components, like
JTable,
StatusBar, ...

I have created a class like this:

public class MyInternalFrame extends JInternalFrame
{
private JPanel jPanel1 = new JPanel();
private JTable jTable1 = new JTable();
private BorderLayout borderLayout1 = new BorderLayout();

public MyInternalFrame() {
try {
jbInit();
}
catch(Exception e) {
e.printStackTrace();
}
}
private void jbInit() throws Exception {
jPanel1.setLayout(borderLayout1);
jPanel1.add(jTable1, BorderLayout.CENTER);
this.getContentPane().add(jPanel1, BorderLayout.CENTER);
}
}

And now I want to extends this class and design with JBuilder, but
it is not
posible. If I extend this class like this:

public class OtherInternalFrame extends MyInternalFrame
{
public OtherInternalFrame() {
super();
}
}

When I click Design I show this message:

Failed to create live instance for variable 'this'. null
class java.lang.NullPointerException null

I created with wizard of JBuilder. What is the trouble?




 

{smallsort}