Exemplo n.º 1
0
 @Override
 public void stateChanged(ChangeEvent event) {
   Object source = event.getSource();
   if (source.equals(gui.getSizeSpinner())) {
     gui.getTestText()
         .setFont(
             new Font(
                 gui.getFontName().getSelectedValue(),
                 Font.PLAIN,
                 (int) gui.getSizeSpinner().getValue()));
   }
 }
Exemplo n.º 2
0
 @Override
 public void actionPerformed(ActionEvent event) {
   Object source = event.getSource();
   if (source.equals(gui.getCancel())) {
     gui.hideWindow();
   } else if (source.equals(gui.getApply())) {
     font =
         new Font(
             gui.getFontName().getSelectedValue(),
             Font.PLAIN,
             (int) gui.getSizeSpinner().getValue());
     color = FontManager.COLORS[gui.getBox().getSelectedIndex()];
     gui.hideWindow();
   }
 }