This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes JSpinner Font help. Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Reply Bookmark "JSpinner Font help." Watch "JSpinner Font help." New topic
Author

JSpinner Font help.

David Garratt
Ranch Hand

Joined: Aug 08, 2003
Posts: 184

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

Joined: May 03, 2008
Posts: 4166
    
    3

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.


luck, db
There are no new questions, but there may be new answers.
David Garratt
Ranch Hand

Joined: Aug 08, 2003
Posts: 184

Thanks for the help - that worked.

Dave
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: JSpinner Font help.
 
Similar Threads
Behaviour of Volatile variables
if (false == true) Universe.end(42);
MacOS 10.5.8 browsers and Java 1.6
Workaround for possible java bug - os x
BUILD FAILED java.lang.NoClassDefFoundError: org/apache/xpath/XPathAPI