Пример #1
0
 @Override
 public void valueChanged(ListSelectionEvent event) {
   Object source = event.getSource();
   if (source.equals(gui.getFontName())) {
     gui.getTestText()
         .setFont(
             new Font(
                 gui.getFontName().getSelectedValue(),
                 Font.PLAIN,
                 (int) gui.getSizeSpinner().getValue()));
   }
 }
Пример #2
0
 @Override
 public void itemStateChanged(ItemEvent event) {
   if (event.getStateChange() == ItemEvent.SELECTED)
     gui.getTestText().setForeground(FontManager.COLORS[gui.getBox().getSelectedIndex()]);
 }