setDocument ( doc ) [message #90647] |
Wed, 11 May 2005 11:15  |
Eclipse User |
|
|
|
Hello,
I have a JTextField and if I call jTextField.setDocument(..) I get an
exception: java.lang.IllegalArgumentException(..too complicated..). Can it
be a bug ?
Here is a code:
private JTextField getJTextField() {
if (jTextField == null) {
jTextField = new JTextField();
Document doc1 = new PlainDocument();
jTextField.setDocument(doc1);
}
return jTextField;
}
Thanks
Elena
|
|
|
|
|
|
Re: setDocument ( doc ) [message #90867 is a reply to message #90764] |
Thu, 12 May 2005 10:51  |
Eclipse User |
|
|
|
Originally posted by: richkulp.us.NO_SPAM.ibm.com
Thanks for the info. I just checked and yes the version you are using
comes up with a warning. The code we just checked in last night puts it
back to what it should of been, an info symbol. We introduced a bug
somewhere in the past.
Elena wrote:
> P.S. There is not an information icon on textfield (without annotation).
> There is a warning icon (yellow triangle).
>
>
>
> Elena
>
>
>
>
--
Thanks,
Rich Kulp
|
|
|
Re: setDocument ( doc ) [message #607728 is a reply to message #90647] |
Wed, 11 May 2005 11:33  |
Eclipse User |
|
|
|
Originally posted by: richkulp.us.NO_SPAM.ibm.com
No it's not a bug. Whenever you get too complicated, you'll notice that
it is using a "i" info icon. This means it is not an error or even a
warning. It is just a information msg to you that we couldn't apply the
setting to the live object at design time because it was too complicated
for us to apply it.
The reason it was too complicated in this case is because you didn't
tell us that doc1 was a variable of interest. We have a set pre-defined
classes that will result in variables of interest (such as
java.awt.Component). Any others are by default not of interest so we
ignore them.
To mark the doc1 as being of interest you need to add a comment. It
should look like:
>
> Document doc1 = new PlainDocument(); // @jve:decl-index=0
>
> jTextField.setDocument(doc1);
>
> }
> return jTextField;
> }
>
>
>
>
>
> Thanks
> Elena
>
--
Thanks,
Rich Kulp
|
|
|
Re: setDocument ( doc ) [message #607740 is a reply to message #90675] |
Thu, 12 May 2005 04:32  |
Eclipse User |
|
|
|
Thanks for help,
the annotation has worked !
P.S. There is not an information icon on textfield (without annotation).
There is a warning icon (yellow triangle).
Elena
|
|
|
Re: setDocument ( doc ) [message #607746 is a reply to message #90764] |
Thu, 12 May 2005 09:21  |
Eclipse User |
|
|
|
Originally posted by: richkulp.us.NO_SPAM.ibm.com
I'll take a look, it should of been an information icon.
Elena wrote:
> Thanks for help,
>
> the annotation has worked !
>
>
> P.S. There is not an information icon on textfield (without annotation).
> There is a warning icon (yellow triangle).
>
>
>
> Elena
>
>
>
>
--
Thanks,
Rich Kulp
|
|
|
Re: setDocument ( doc ) [message #607747 is a reply to message #90764] |
Thu, 12 May 2005 10:51  |
Eclipse User |
|
|
|
Originally posted by: richkulp.us.NO_SPAM.ibm.com
Thanks for the info. I just checked and yes the version you are using
comes up with a warning. The code we just checked in last night puts it
back to what it should of been, an info symbol. We introduced a bug
somewhere in the past.
Elena wrote:
> P.S. There is not an information icon on textfield (without annotation).
> There is a warning icon (yellow triangle).
>
>
>
> Elena
>
>
>
>
--
Thanks,
Rich Kulp
|
|
|
Powered by
FUDForum. Page generated in 0.04912 seconds