 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Arun Guest
|
Posted: Thu Jun 23, 2005 3:47 pm Post subject: Javabean property question |
|
|
Hi,
I am writing a simple bean and I need to make a pickable color property just
like JBuilder Designer's foreground (or background) color picker. Could
someone please suggest how?
Normally, in the Designer if I declare a property such as ifZeroColor then
it makes a get and a set method (example below)
public void setIfZeroColor(java.awt.Color ifZeroColor) {
this.ifZeroColor = ifZeroColor;
}
public java.awt.Color getIfZeroColor() {
return ifZeroColor;
}
I would like to use a colorChooser when the value for ifZeroColor is to be
entered, instead of manually entering it in the designer.
Regards
Arun
|
|
| Back to top |
|
 |
Kevin Dean [TeamB] Guest
|
Posted: Thu Jun 23, 2005 5:17 pm Post subject: Re: Javabean property question |
|
|
Arun wrote:
| Quote: | Hi,
I am writing a simple bean and I need to make a pickable color
property just like JBuilder Designer's foreground (or background)
color picker. Could someone please suggest how?
Normally, in the Designer if I declare a property such as ifZeroColor
then it makes a get and a set method (example below)
public void setIfZeroColor(java.awt.Color ifZeroColor) {
this.ifZeroColor = ifZeroColor;
}
public java.awt.Color getIfZeroColor() {
return ifZeroColor;
}
I would like to use a colorChooser when the value for ifZeroColor is
to be entered, instead of manually entering it in the designer.
Regards
Arun
|
You need to create a BeanInfo class that JBuilder will use to determine
how to edit the field. There's a basic tutorial here:
http://java.sun.com/developer/onlineTraining/Beans/Beans4/nervous06.html
--
Kevin Dean [TeamB]
Dolphin Data Development Ltd.
http://www.datadevelopment.com/
NEW WHITEPAPERS
Team Development with JBuilder and Borland Enterprise Server
Securing Borland Enterprise Server
http://www.datadevelopment.com/papers/index.html
Please see Borland's newsgroup guidelines at
http://info.borland.com/newsgroups/guide.html
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|