I have an interesting question, I'm helping someone can help me out with this. I have been playing with the JavaSound API and I have come into contact with the FloatControls (pan and gain). Basically I know these controls only work if the line supports them.

I have been working on a media player GUI and I want to display the swing components that are related to the FloatControls. I only want to add them to the content pane if the line supports them. Now it is my understanding that you can only check if a line supports controls after it has been created and to create one you need a file to do so (maybe I'm wrong). Here is my problem, my program is letting the user select the file once the program is running, so how am I suppose to know what controls to add to the content pane if I don't have a SourceLine set up yet?

12 Years
Discussion Span
Last Post by jwenting

create the user interface on the fly depending on what features the stream supports.

By on the fly do you mean right as the program starts up or after the user selects a file? If it is when the program starts up (as I wish to do), who do I instantiate the stream if a user hasn’t selected a file for the program to read in yet; do I just create a blank stream?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.