• Post Reply Bookmark Topic Watch Topic
  • New Topic

JSPINNER - ABOUT TIME!  RSS feed

 
Alex Ioannou
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all
Just thought that I would introduce you all to JSpinner, a new feature in J2SDK 1.4.
JSpinner provides the arrow interface to increment a value in a textfield. An example of this is in your windows date/time settings, you'll see that you can adjust the year by moving the little arrows to the right of the textbox.
I'm surprised that earlier versions of the J2SDK did not implement this, but at least they have now.
Well here is a bit of sample code, enjoy.
Al
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Actually, you could implement this on earlier versions. Make a thin JTextArea with a Vertical Scroll Pane and append all your values to the list before drawing it.
There is always a work around. Don't ever become dependent on API's.
Just my two cents.

------------------
Happy Coding,
Gregg Bolinger
 
Michael Szul
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I, personally, was more thrilled with the addition of regular expressions.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!