list.setVisibleRowCount(16);
list.setVisibleRowCount(10);
	public FtpBrowser(View view, Buffer buffer, int type)	{		super(view,jEdit.getProperty("vfs.ftp.browser."			+ (type == OPEN ? "open" : "save") + "-title"),true);		this.view = view;		this.type = type;		// Get default values for fields from buffer's current		// settings		String host, user, password, path = null;		if(buffer.getVFS() instanceof FtpVFS)		{			FtpAddress address = new FtpAddress(buffer.getPath());			host = address.host + ":" + address.port;			user = address.user;			if(user == null)				user = (String)buffer.getProperty(FtpVFS.USERNAME_PROPERTY);			password = address.password;			if(password == null)				password = (String)buffer.getProperty(FtpVFS.PASSWORD_PROPERTY);			path = MiscUtilities.getFileParent(address.path);		}		else		{			host = null;			user = null;			password = null;			path = null;		}		JPanel topPanel = new JPanel(new BorderLayout());		JPanel topLabels = new JPanel(new GridLayout(4,1));		topLabels.add(new JLabel(jEdit.getProperty("vfs.ftp.browser.host"),			SwingConstants.RIGHT));		topLabels.add(new JLabel(jEdit.getProperty("vfs.ftp.browser.username"),			SwingConstants.RIGHT));		topLabels.add(new JLabel(jEdit.getProperty("vfs.ftp.browser.password"),			SwingConstants.RIGHT));		topLabels.add(new JLabel(jEdit.getProperty("vfs.ftp.browser.path"),			SwingConstants.RIGHT));		topPanel.add(BorderLayout.WEST,topLabels);		JPanel topFields = new JPanel(new GridLayout(4,1));		topFields.add(hostField = new JTextField(host));		topFields.add(userField = new JTextField(user));		topFields.add(passwordField = new JPasswordField(password));		topFields.add(pathField = new JTextField(path));		topPanel.add(BorderLayout.CENTER,topFields);		getContentPane().add(BorderLayout.NORTH,topPanel);		JPanel buttons = new JPanel();		ActionHandler actionHandler = new ActionHandler();		// the below locks the preferred size so that the buttons		// don't jump around		select = new JButton(jEdit.getProperty("vfs.ftp.browser.connect"));		select.setPreferredSize(select.getPreferredSize());		select.addActionListener(actionHandler);		buttons.add(select);		home = new JButton(jEdit.getProperty("vfs.ftp.browser.home"));		home.addActionListener(actionHandler);		buttons.add(home);		refresh = new JButton(jEdit.getProperty("vfs.ftp.browser.refresh"));		refresh.addActionListener(actionHandler);		buttons.add(refresh);		cancel = new JButton(jEdit.getProperty("common.cancel"));		cancel.addActionListener(actionHandler);		buttons.add(cancel);		list = new JList();		list.setVisibleRowCount(16);		list.addListSelectionListener(new ListHandler());		getContentPane().add(BorderLayout.CENTER,new JScrollPane(list));		getContentPane().add(BorderLayout.SOUTH,buttons);		update();		pack();		setLocationRelativeTo(view);		show();	}