Link to home
Start Free TrialLog in
Avatar of jasoncuevas
jasoncuevas

asked on

How do I add a FontChooser class into my ActionPerformed method.

I previously asked about a font chooser, and someone gave me one. The problem is now I don't know how to make that class work in my action performed method that runs when my change font button is pressed. I got the FontChanger link is http://examples.oreilly.com/jswing2/code/ch12/FontChooser.java .  I would really appreciate anyone who could help me figure this out.
Avatar of aozarov
aozarov

FontChooser chooser =  FontChooser(your_frame_instance);
chooser.setVisible(true);

now you can call chooser.getNewFont() or chooser.getNewColor() or chooser.getAttributes()
ASKER CERTIFIED SOLUTION
Avatar of aozarov
aozarov

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
sorry (missing the new):
FontChooser chooser =  new FontChooser(MyJFrame.this);