BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Javabean property question

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> JBuilder IDE
View previous topic :: View next topic  
Author Message
Arun
Guest





PostPosted: Thu Jun 23, 2005 3:47 pm    Post subject: Javabean property question Reply with 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


Back to top
Kevin Dean [TeamB]
Guest





PostPosted: Thu Jun 23, 2005 5:17 pm    Post subject: Re: Javabean property question Reply with quote



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
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> JBuilder IDE All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.