Browser(JmDNS jmdns, String types[]) { super("JmDNS Browser"); this.jmdns = jmdns;  Color bg = new Color(230, 230, 230); EmptyBorder border = new EmptyBorder(5, 5, 5, 5); Container content = getContentPane(); content.setLayout(new GridLayout(1, 3)); Arrays.sort(types); type = types[0];  typeList = new JList(types); typeList.setBorder(border); typeList.setBackground(bg); typeList.setSelectedIndex(0); typeList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); typeList.addListSelectionListener(this);  JPanel typePanel = new JPanel(); typePanel.setLayout(new BorderLayout()); typePanel.add("North", new JLabel("Types")); typePanel.add("Center", new JScrollPane(typeList, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED)); content.add(typePanel);  services = new DefaultListModel(); serviceList = new JList(services); serviceList.setBorder(border); serviceList.setBackground(bg); serviceList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); serviceList.addListSelectionListener(this);  JPanel servicePanel = new JPanel(); servicePanel.setLayout(new BorderLayout()); servicePanel.add("North", new JLabel("Services")); servicePanel.add("Center", new JScrollPane(serviceList, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED)); content.add(servicePanel);  info = new JTextArea(); info.setBorder(border); info.setBackground(bg); info.setEditable(false); info.setLineWrap(true);  JPanel infoPanel = new JPanel(); infoPanel.setLayout(new BorderLayout()); infoPanel.add("North", new JLabel("Details")); infoPanel.add("Center", new JScrollPane(info, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED)); content.add(infoPanel);  setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); setLocation(100, 100); setSize(600, 400); show();  jmdns.addServiceListener(type, this);
Browser(JmDNS jmdns) { this(jmdns, new String[] { "_http._tcp.local.", "_ftp._tcp.local.", "_tftp._tcp.local.", "_ssh._tcp.local.", "_smb._tcp.local.", "_printer._tcp.local.", "_airport._tcp.local.", "_afpovertcp._tcp.local.", "_ichat._tcp.local.", "_eppc._tcp.local.", "_presence._tcp.local." });
    Browser(JmDNS jmdns, String types[])    {         super("JmDNS Browser");	this.jmdns = jmdns;	Color bg = new Color(230, 230, 230);        EmptyBorder border = new EmptyBorder(5, 5, 5, 5);	Container content = getContentPane();        content.setLayout(new GridLayout(1, 3));	Arrays.sort(types);	type = types[0];		typeList = new JList(types);        typeList.setBorder(border);	typeList.setBackground(bg);	typeList.setSelectedIndex(0);	typeList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);	typeList.addListSelectionListener(this);	JPanel typePanel = new JPanel();	typePanel.setLayout(new BorderLayout());	typePanel.add("North", new JLabel("Types"));	typePanel.add("Center", new JScrollPane(typeList, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED));	content.add(typePanel);	services = new DefaultListModel();	serviceList = new JList(services);	serviceList.setBorder(border);	serviceList.setBackground(bg);	serviceList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);	serviceList.addListSelectionListener(this);	JPanel servicePanel = new JPanel();	servicePanel.setLayout(new BorderLayout());	servicePanel.add("North", new JLabel("Services"));	servicePanel.add("Center", new JScrollPane(serviceList, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED));	content.add(servicePanel);	info = new JTextArea();	info.setBorder(border);	info.setBackground(bg);	info.setEditable(false);	info.setLineWrap(true);	JPanel infoPanel = new JPanel();	infoPanel.setLayout(new BorderLayout());	infoPanel.add("North", new JLabel("Details"));	infoPanel.add("Center", new JScrollPane(info, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED));	content.add(infoPanel);		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);        setLocation(100, 100);        setSize(600, 400);        show();	jmdns.addServiceListener(type, this);    }