File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSpinner Font help.

 
David Garratt
Ranch Hand
Posts: 212
Eclipse IDE Mac Safari
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am running a swing application on OS X and I've tried every way I can think of to set the font size of the edit field - but it does not seem to work.

jSpinnerQuantity.setFont(Common.font_std);
JSpinner.NumberEditor ne = new JSpinner.NumberEditor(jSpinnerQuantity);
ne.setFont(Common.font_std);
ne.getTextField().setFont(Common.font_std);

If the above looks ok to you - could someone else who has access to an OS X machine verify if there is a problem this running on Apple OS X


java version "1.6.0_24"
Java(TM) SE Runtime Environment (build 1.6.0_24-b07-334-10M3326)
 
Darryl Burke
Bartender
Posts: 5115
11
Java Netbeans IDE Opera
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't have OS X but this is what I would try:
edit Constructing a JSpinner.NumberEditor for jSpinnerQuantity doesn't automagically set the editor to the spinner. You would have to use setEditor(...) for that to happen.
 
David Garratt
Ranch Hand
Posts: 212
Eclipse IDE Mac Safari
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the help - that worked.

Dave
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic