Instantiating derrived component [message #607234] |
Mon, 25 April 2005 09:04 |
Eclipse User |
|
|
|
Originally posted by: vladis.gemtek.lt
Hi,
I am new to VE. Sorry if this was asked a million times:
I have my text field, i.e. MyTextField which is derrived from JTextField. I
want to instantiate MyTextField not JTextField. Everytime I try to cheat VE
I run into problems:
private JTextField getJTextField1() {
if (jTextField1 == null) {
jTextField1 = new MyTextField(); // I want MyTextField.
}
return jTextField1;
}
After editing source this way, I am not able to edit properties of changed
component in VE. I wouldn't mind if VE just let me operate on control as
JTextField. Is only way to add derrived component is write custom widget?
Most of my components are simply derrived from original Swing ones.
Best regards,
Vladas
|
|
|
Powered by
FUDForum. Page generated in 0.25764 seconds