public void findAcceptableFormats()
	{
		JFrame frame = new JFrame();
		int width = 400;
		int height = 500;
		frame.setSize(width, height);
		frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		SpringLayout sl = new SpringLayout();
		frame.setLayout(sl);

		final JProgressBar progressBar = new JProgressBar(SwingConstants.HORIZONTAL, 0, 100);
		progressBar.setPreferredSize(new Dimension(300, 50));

		sl.putConstraint(SpringLayout.NORTH, progressBar, height / 2 - progressBar.getPreferredSize().height / 2,
			SpringLayout.NORTH, frame.getContentPane());
		sl.putConstraint(SpringLayout.WEST, progressBar, width / 2 - progressBar.getPreferredSize().width / 2, SpringLayout.WEST,
			frame.getContentPane());
		frame.add(progressBar);

		new Thread(new Runnable()
		{
			int[]							sampleRates	= new int[]
														{8000, 11025, 16000, 22050, 32000, 44056, 44100, 47250, 48000, 50000,
															50400, 88200, 96000, 176400, 192000, 352800};
			int[]							sampleSizes	= new int[]
														{8, 16, 24, 32};
			int[]							channels	= new int[]
														{1, 2, 5};
			boolean[]						bools		= new boolean[]
														{true, false};

			HashMap<AudioFormat, String>	formats		= new HashMap<AudioFormat, String>();

			@Override
			public void run()
			{
				progressBar.setMaximum(sampleRates.length * sampleSizes.length * channels.length * bools.length * bools.length);

				for(int sampleRate : sampleRates)
				{
					for(int sampleSize : sampleSizes)
					{
						for(int channel : channels)
						{
							for(boolean signed : bools)
							{
								for(boolean bigEndian : bools)
								{
									AudioFormat format = new AudioFormat(sampleRate, sampleSize, channel, signed, bigEndian);

									StringBuilder builder = new StringBuilder();
									try
									{
										AudioSystem.getTargetDataLine(format);
										builder.append("Target line exists");
									}
									catch(Exception e)
									{
										builder.append("                  ");
									}
									builder.append(" : ");
									try
									{
										AudioSystem.getSourceDataLine(format);
										builder.append("Source Line Exists");
									}
									catch(Exception e)
									{
										builder.append("                  ");
									}

									formats.put(format, builder.toString());

									progressBar.setValue(progressBar.getValue() + 1);
									progressBar.repaint();
								}
							}
						}
					}
				}

				printFormats(formats);
			}
		}).start();

		frame.setVisible(true);
	}