File file = new File("lang");
String langPath = System.getProperty("user.dir")+FILESEP+ System.getProperty("java.class.path"); langPath = langPath.substring(0, langPath.indexOf("jfritz.jar")) + "lang"; System.out.println(langPath); File file = new File(langPath);
    public ConfigPanelLang(){            	JPanel localePane = new JPanel();		localePane.setLayout(new GridBagLayout());		localePane.setBorder(BorderFactory.createEmptyBorder(10, 20, 5, 20));		GridBagConstraints c = new GridBagConstraints();		c.insets.top = 5;		c.insets.bottom = 5;		c.insets.left = 5;		c.anchor = GridBagConstraints.WEST;		JLabel label = new JLabel(""); //$NON-NLS-1$		c.gridy = 2;		label = new JLabel(JFritz.getMessage("language") + ": "); //$NON-NLS-1$,  //$NON-NLS-2$		localePane.add(label, c);		File file = new File("lang");//$NON-NLS-1$		FilenameFilter props = new StartEndFilenameFilter("jfritz","properties");//$NON-NLS-1$,  //$NON-NLS-2$		String[] list = file.list(props);		localeList= new String[list.length];				ImageIcon[]  images = new ImageIcon[list.length];				//TODO: this code has to be changed so that jfritz can run from any dir		for (int i = 0; i < list.length; i++) {			localeList[i] = list[i].substring(list[i].indexOf("_") + 1,list[i].indexOf("."));//$NON-NLS-1$,  //$NON-NLS-2$			images[i] = new ImageIcon("lang"+FILESEP+"flags"+FILESEP+localeList[i].substring(localeList[i].indexOf("_")+1, localeList[i].length()) + ".gif");//$NON-NLS-1$,  //$NON-NLS-2$ //$NON-NLS-3$,  //$NON-NLS-4$			images[i].setDescription(JFritz.getLocaleMeaning(localeList[i]));		}						c.fill = GridBagConstraints.HORIZONTAL;				languageCombo = new JComboBox(images);		languageComboBoxRenderer renderer = new languageComboBoxRenderer();		renderer.setPreferredSize(new Dimension(180, 15));		languageCombo.setRenderer(renderer);		languageCombo.setActionCommand("languageCombo"); //$NON-NLS-1$		languageCombo.setMaximumRowCount(8);		localePane.add(languageCombo, c);				add(localePane);			    }