Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes Swing / AWT / SWT and the fly likes JSpinner arrow listener Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JSpinner arrow listener" Watch "JSpinner arrow listener" New topic
Author

JSpinner arrow listener

Mathias Nilsson
Ranch Hand

Joined: Aug 21, 2004
Posts: 367
Hi!

I need to change the value only when I press one of the arrows in a JSpinner component.
How can I add a listener to the arrow buttons. I tried ChangeListener but it was not what I needed


SCJP1.4
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
not sure I understand the question, but this will give you access to the arrow buttons

Mathias Nilsson
Ranch Hand

Joined: Aug 21, 2004
Posts: 367
Thanks you very much. This was exactly what I was looking for

// Mathias
 
Consider Paul's rocket mass heater.
 
subject: JSpinner arrow listener
 
Similar Threads
Trap up/down arrowbutton event in JSpinner
JWhat
Unable to use JSpinner properly.
JSpinner dateeditor issues
how to Change JSpinner&JComboBox Arrows Color?