java.awt. Container why not add a Component Group ? [message #142199] |
Tue, 23 October 2007 10:36 |
Eclipse User |
|
|
|
Originally posted by: caye5200.yahoo.com.cn
hello,
java.awt. Container.java hava a
public void add(Component comp, Object constraints) {
addImpl(comp, constraints, -1);
} method,but not hava
public void add(Component[ ] comp, Object constraints) {... }
so,i create a myContainer class extends java.awt. Container
and create this method,folloing:
public void add(Component[] arg ,Object arg1)
{
for(int i=0;i<arg.length;i++)
{
this.add(arg[i], arg1);
}
}
VE view code is folloing,
this.add(getJTextPaneGroup(),null);
private JTextPane[] getJTextPaneGroup() {
if (JTextPaneGroup == null) {
JTextPaneGroup = new JTextPane[3];
JTextPaneGroup[0]=new JTextPane();
JTextPaneGroup[0].setBounds(new Rectangle(140, 91, 150, 49));
JTextPaneGroup[1]=new JTextPane();
JTextPaneGroup[1].setBounds(new Rectangle(140, 191, 150, 49));
JTextPaneGroup[2]=new JTextPane();
JTextPaneGroup[2].setBounds(new Rectangle(140, 291, 150, 49));
}
return JTextPaneGroup;
}
Why VE not View the JTextPaneGroup? how i can do VE can View?
|
|
|
Powered by
FUDForum. Page generated in 0.04499 seconds