/** * Creates a new location bar. */ public LocationBar() { super(new BorderLayout(5, 5)); JLabel label = new JLabel(rManager.getString("Panel.label")); add("West", label); try { String s = rManager.getString("Panel.icon"); URL url = getClass().getResource(s); if (url != null) { label.setIcon(new ImageIcon(url)); } } catch (MissingResourceException e) { } add("Center", comboBox = new JComboBox()); comboBox.setEditable(true); }
/** * Creates a new location bar. */ public LocationBar() { super(new BorderLayout(5, 5)); JLabel label = new JLabel(rManager.getString("Panel.label")); add("West", label); try { String s = rManager.getString("Panel.icon"); URL url = getClass().getResource(s); if (url != null) { label.setIcon(new ImageIcon(url)); } } catch (MissingResourceException e) { } add("Center", comboBox = new JComboBox()); comboBox.setEditable(true); }