private JPanel createFontSelection()
{
JPanel panel = new JPanel(new GridLayout(1, 2, 10, 2));
panel.setBorder(new TitledBorder(new EtchedBorder(), "Font"));
FontLoader loader = FontLoader.getInstance();
font_names_ = new OpenList(loader.getFontNames(), "Name:");
panel.add(font_names_);
font_sizes_ = new OpenList(sizes_, "Size:");
panel.add(font_sizes_);
ListSelectionListener lsel = new ListSelectionListener()
{
public void valueChanged(ListSelectionEvent e)
{
// System.out.println("MODIFICATION");
updatePreview();
}
};
font_sizes_.setSelected("24");
font_names_.setSelected(loader.getFontNames()[0]);
font_names_.addListSelectionListener(lsel);
font_sizes_.addListSelectionListener(lsel);
return panel;