Designer errors
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Anonymous
Posted On:   Monday, March 10, 2003 02:53 AM

Hi. I made a JApplet, and filled the jbInit() with code that came originally from NetBeans. When invoking the designer, I get these error msgs: (numbering is mine) 1. Adding live component failed. Child=ToolBar Container=this java.lang.Error: Do not use javax.swing.JApplet.add() use javax.swing.JApplet.getContentPane().add() instead (ToolBar is used where toolBar would be appropriate, but it's not my code, and this is a JToolBar component) 2. Adding live component failed. Child=mainPanel Container=this java.lang.Error: Do not use javax.swing.JApplet.add() use javax.swing.JApplet.getContentPane().add() instead 3. java.lang.IllegalArgument   More>>

Hi.

I made a JApplet, and filled the jbInit() with code that came originally
from NetBeans.

When invoking the designer, I get these error msgs: (numbering is mine)

1. Adding live component failed. Child=ToolBar Container=this
java.lang.Error: Do not use javax.swing.JApplet.add() use
javax.swing.JApplet.getContentPane().add() instead
(ToolBar is used where toolBar would be appropriate, but it's not my code,
and this is a JToolBar component)

2. Adding live component failed. Child=mainPanel Container=this
java.lang.Error: Do not use javax.swing.JApplet.add() use
javax.swing.JApplet.getContentPane().add() instead

3. java.lang.IllegalArgumentException: argument type mismatch new
javax.swing.table.DefaultTableModel(new Object[][]{}, new String[]{"Numer",
"Store Name", "Site Name", "Site Address", "Price"})
{
boolean[] canEdit = new boolean[]{false, false, false, false, false};
public boolean isCellEditable(int rowIndex, int columnIndex)
{
return canEdit[columnIndex];
}
}


Questions:
1. what do one and two mean? the code that adds these components DOES use
getContentPane().add(...).

Also, on another machine (with the same code) I only get error 3

2. what does 3 mean? it does not prevent JB from compiling, or my app from
running in a browser or anything!


On JB7EE, using jdk141_01 for this proj.


TIA,

   <<Less
About | Sitemap | Contact