I've made a simple control (code below):
- Code: Select all
package test.application;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Text;
public class AText extends Text {
private String a;
public String getA() {
return a;
}
public void setA(String a) {
this.a = a;
}
public AText(Composite arg0, int arg1) {
super(arg0, arg1);
}
}
and when I try to put it on the application form in designer, I can't see it. Here is a source for test application:
- Code: Select all
package test.application;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
import test.application.AText;
public class TestApplication {
private static AText text_1;
public static void main(String[] args) {
final Display display = Display.getDefault();
final Shell shell = new Shell();
shell.setSize(500, 375);
shell.setText("SWT Application");
shell.open();
{
text_1 = new AText(shell, SWT.BORDER);
text_1.setBounds(85, 155, 120, 30);
}
shell.layout();
while (!shell.isDisposed()) {
if (!display.readAndDispatch())
display.sleep();
}
}
}
Eclipse:
Version: 3.1.1
Build id: M20050929-0840
Designer:
ver 4.2.0 (trial... maybe here is a problem)
J2SE 5.0
Regards