Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Visual Editor (VE) » java.awt. Container why not add a Component Group ?
java.awt. Container why not add a Component Group ? [message #616793] Tue, 23 October 2007 10:36
Eclipse UserFriend
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?
Previous Topic:java.awt. Container why not add a Component Group ?
Next Topic:Designing Swing Applications on Eclipse
Goto Forum:
  


Current Time: Fri Apr 26 11:30:01 GMT 2024

Powered by FUDForum. Page generated in 0.03015 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top