• Post Reply Bookmark Topic Watch Topic
  • New Topic

Workaround for possible java bug - os x  RSS feed

 
David Garratt
Ranch Hand
Posts: 216
Eclipse IDE Mac Safari
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The following extract of code from my application when run on a Windows based PC seems to have the desired effect and changes the font of the JSpinner. However the same code on a Max OS X machine does not work. I can change the font of other object on the same screen (labels, text fields) etc to the same font without any problem - and the font is installed on the machine. I am starting to think there maybe a bug with the JRE which has come with the Mac.

SpinnerNumberModel jSpinnerIntModel = new SpinnerNumberModel();
jSpinnerIntModel.setMinimum(1);
jSpinnerIntModel.setMaximum(5000);
jSpinnerIntModel.setStepSize(1);
jSpinnerLimit = new JSpinner();
jSpinnerLimit.setFont(new Font("Arial", Font.PLAIN, 10));
jSpinnerLimit.getEditor().setFont(new Font("Arial", Font.PLAIN, 10));

jSpinnerLimit.setModel(jSpinnerIntModel);
jSpinnerLimit.setBounds(905, 134, 68, 21);
jSpinnerLimit.setValue(1000);
jSpinnerLimit.getEditor().setSize(45, 21);
jDesktopPane1.add(jSpinnerLimit);

Unless I've done something silly on the code side can anyone supply an example of a workaround which might let me accomplish the same result.

Many thanks

Dave

 
David Garratt
Ranch Hand
Posts: 216
Eclipse IDE Mac Safari
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The java version number installed on the OS X machine is 1.6.0_24-b07-334

Thanks

Dave
 
David Garratt
Ranch Hand
Posts: 216
Eclipse IDE Mac Safari
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here are a couple of screen shots of the same application from Windows (above) and OS X (below)
osx-java-bug.jpg
[Thumbnail for osx-java-bug.jpg]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!