JLabel label;
ResourceBundle bundle =
ResourceBundle.getBundle(FontChooserUI.class.getName() + "RB");
fontPanel = new JPanel(new PercentLayout(PercentLayout.VERTICAL, 2));
fontPanel.add(
label = new JLabel(bundle.getString("FontChooserUI.fontLabel")));
fontPanel.add(fontField = new JTextField(25));
fontField.setEditable(false);
fontPanel.add(new JScrollPane(fontList = new JList()), "*");
label.setLabelFor(fontList);
label.setDisplayedMnemonic(
bundle.getString("FontChooserUI.fontLabel.mnemonic").charAt(0));
fontList.setVisibleRowCount(7);
fontList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
String[] fontFamilies = chooser.getModel().getFontFamilies(null);
fontList.setListData(fontFamilies);
fontSizePanel = new JPanel(new PercentLayout(PercentLayout.VERTICAL, 2));
fontSizePanel.add(
label = new JLabel(bundle.getString("FontChooserUI.styleLabel")));
fontSizePanel.add(
boldCheck = new JCheckBox(bundle.getString("FontChooserUI.style.bold")));