Skip to main content



      Home
Home » Archived » Visual Editor (VE) » setDocument ( doc )
setDocument ( doc ) [message #90647] Wed, 11 May 2005 11:15 Go to next message
Eclipse UserFriend
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 #90675 is a reply to message #90647] Wed, 11 May 2005 11:33 Go to previous messageGo to next message
Eclipse UserFriend
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 #90764 is a reply to message #90675] Thu, 12 May 2005 04:32 Go to previous messageGo to next message
Eclipse UserFriend
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 #90852 is a reply to message #90764] Thu, 12 May 2005 09:21 Go to previous messageGo to next message
Eclipse UserFriend
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 #90867 is a reply to message #90764] Thu, 12 May 2005 10:51 Go to previous message
Eclipse UserFriend
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 Go to previous message
Eclipse UserFriend
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 Go to previous message
Eclipse UserFriend
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 Go to previous message
Eclipse UserFriend
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 Go to previous message
Eclipse UserFriend
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
Previous Topic:Undesired customizer buttons
Next Topic:Property change event not persisting its value?
Goto Forum:
  


Current Time: Fri Jun 20 16:28:54 EDT 2025

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

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

Back to the top