> From: Brandon Kohn <[EMAIL PROTECTED]> > > I'm attempting to change the opacity of an array of points (pointarray) > based on the value of a JSlider (swing component). I'm looking into the use > of behaviors, but they seem to support only AWT component events. Does > anyone know of a better way to do something like this? I would like to use > the behavior class if possible (so as to avoid writing my own threaded > mess). You probably don't need to use a Behavior here. No matter what, you are going to need to write the UI code to create the slider and listen for events. From there, you can either make your slider listener modify the point size directly: public void stateChanged(ChangeEvent e) { JSlider source = (JSlider)e.getSource(); float trans = source.getValue(); pointAttributes.setTransparency(trans); } Or you can use a Behavior.postId() to process the AWT event in a Behavior. Behavior.postId() is useful when you are making several changes to the scene graph in response to an external event (such as a UI change). If you just change the scene graph, your changes won't get grouped together. J3D may draw a new frame before you have completed your changes (in the worst case, one frame per change). Using Behavior.postId() you'll be sure that all the changes show up on the same frame. I'll post an example of using Behavior.postId() soon. Since you are only changing a single appearance, making the change directly is probably what you want. Doug Gehringer Sun Microsystems =========================================================================== To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff JAVA3D-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help".