0

I would like to change the look of the JSpinner arrow buttons so that theses buttons have no border.

Is it possible to get a reference on theses buttons to simply call a setBorder() on them, instead of write a spinner UI only for that purpose?

paranoia25
  • 626
  • 1
  • 5
  • 23
  • 2
    you can always scan the child components of the JSpinner and check that the component is different from `getEditor()`. The ones that are different should be the buttons (of course some UI may decide to add other or more components but it will work in most cases) – Guillaume Polet Jun 14 '13 at 10:23

2 Answers2

2

In a subclass of BasicSpinnerUI, you can override the create[Previous|Next]Button methods and change the border on the component returned by the superclass.

Catalina Island
  • 7,027
  • 2
  • 23
  • 42
0

What you have to do is, download a source code of customLookAndFeel(like jtatto, nimbusLookandfeel,seaglass, lookandfeel,)and use only the abstract theme for JSpinners, if you cant find a code tell me I will give you the class files in that you can draw your own borders , give bgcolors,fgcolors,text rendering, button shading etc...... that class overrides many methods in BasicSpinnerUI

Wiki
  • 245
  • 3
  • 13