Creating a 3-slider bean using Bean Builder

Posted on 2006-04-30
Last Modified: 2013-11-21
I'm trying to create a 3-slider color chooser in Bean Builder, and I have numerous questions, since I'm a complete n00b to beans and Bean Builder. I add 3 JSliders to the bean design area, and a JPanel, then I drag the arrows from the sliders to the panel, so far I think that is right. I need to change the background color of the panelusing one slider for each of the color components red, green, and blue, butthe best I can find in the event chooser for source is propertyChanged() and for target setBackground(). How do I tell the bean that the value variable is used for each slider as it's color variable? How do I tell the panel that I wan't it to repaint after every slider adjustment, and to get the components of the new Color from the values of the 3 sliders? Is there a default non-visual bean model I can use? I'm somewhat familiar with the Model-View-Controller design pattern, and I've worked through the tutorial, but I can't seem to figure outwhat I need to do here. Also, when I'm done I'd like to create a jar and an applet, I'm not really sure what to do with the XML file that is created, not to mention the size of the XML file is 0 bytes (this may be because of a problem using 5.0 instead of 1.4, from what I can glean from other forum posts). Can Bean Builder automate the creation of applets? Thanks in advance.
 BTW if anyone can give me the answer using eclipse Visual Editor, NetBeans 1.5 or beanbox (bdk1.1) instead, this will work just as well.
Question by:suprslackr
    LVL 23

    Accepted Solution


    Author Comment

    Thanks for your reply shivaspk. I know how to do all the things listed on those links. I can get the components set up, but I can't get the events to work right. This is true of the eclipse plugin called Visual Editor, the NetBeans editor for JavaBeans, and Bean Builder. As for BDK1.1, I can't even seem to create a simple slider bean to work with in the beanbox. I know how to make the jar, create the manifest file, and bind properties to beans that are already created, but I can't seem to create a bean that, once jarified, can be loaded and be visible in the beanbox. As you can see, depending on what program I use, I have slighty different problems. I would consider a step-by-step guide to creating the bean (or the Java code to create the jar if beanbox) in one of these editors, plus how to create an applet from the resulting bean, a solution for which I would reward the contributor 500 points. Thanks again, if you think of something else, please let me know. -supr

    Author Comment

    I figured out how to do it with bdk1.1 . Since nobody's posted with suggestions since shihvaspk posted those links, I guess I'll wait a few days and then request a PAQ. If anyone can tell me how you'd do this with Bean Builder, then create an applet with Bean Builder, I'll go ahead and give you the points, just because it would satisfy my curiosity. If nobody writes back by 5/10, I'm goin to try to get my points back. -supr

    Author Comment

    I'd like to get a PAQ.

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Join & Write a Comment

    Introduction This article explores the design of a cache system that can improve the performance of a web site or web application.  The assumption is that the web site has many more “read” operations than “write” operations (this is commonly the ca…
    Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
    Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
    Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now