Hello people,
So i come on this way to know how to implement an ArrayList into a ComboBox.
I would like to put in a ComoBox the audio mixers available from the computer in to a ComboBox, but i don´t know how to do that.
I made this method which show the mixers available:
public void showMixers(){
mixInfo = new ArrayList<Mixer.Info>(Arrays.asList(AudioSystem.getMixerInfo()));
String support;
for(Mixer.Info mixInfos:mixInfo){
Mixer mixer = AudioSystem.getMixer(mixInfos);
support = ", supports";
if(mixer.isLineSupported(portInfo))
support += " Port ";
if(mixer.isLineSupported(targetInfo))
support += " TargetDataLine ";
System.out.println("Mixer: "+ mixInfos.getName()+support+", "+mixInfos.getDescription());
}
}
I would like to put the values (which they are the mixers) into the combobox.
Any tips?