Help! could someone please look at this

I am trying to use JSpinner to display range 0.005 -- 0.995. My initial value is 0.625. But when spinner is displayed it always display 1.000. If I extend my Max value to 1.000, then my arrows work correctly, if I use my Max (0.995), arrows have no effect on value it remains at 1.000.
Here is my code.
SpinnerNumberModel numMod = new SpinnerNumberModel(0.625, 0.005, 0.995, 0.005);
JSpinner spinner = new JSpinner(numMod);
JSpinner.NumberEditor numEdtr = new JSpinner.NumberEditor(spinner,"0.000");
spinner.setEditor(numEdtr);
When I try to debug values they are correct, but initial display is always 1.000 no matter whatever is my initial value ranging between 0.005 -- 0.995
System.out.println("spinner.getValue: "+spinner.getValue());
System.out.println("spinner.getNextValue: "+spinner.getNextValue());
System.out.println"spinner.getPreviousValue: "+ spinner.getPreviousValue () );
I've tried using both JDK 1.4.1 & 1.4.2 with JBuilder 8 with same results. What also confusing me if set my MAX to 1.000 spinner, arrows behaves properly but if my MAX < 0 then arrows don't work at all. Also initial display is always 1.000.
Please if someone can guide me what is wrong here.
Thx
FJF

At first glance, your code looks okay to me. I added your snippet to an application and JSpinner behaved as predicted under 1.4.0. Can you give some more details? (and try to use more meaningful subject lines =)
Cheerio,
Felix
public class Spin extends JFrame {
     public Spin() throws HeadlessException {
          super( "Spin" );
          SpinnerNumberModel numMod = new SpinnerNumberModel(0.625, 0.005, 0.995, 0.005);
          JSpinner spinner = new JSpinner(numMod);
          JSpinner.NumberEditor numEdtr = new JSpinner.NumberEditor(spinner,"0.000");
          spinner.setEditor(numEdtr);
          JPanel mainpane = new JPanel();
          mainpane.add( spinner );
          setContentPane( mainpane );
          pack();
          setVisible( true );
     public static void main(String[] args) {
          Spin app = new Spin();
}

Similar Messages

  • Could someone please sketch out this simple script for me?

    Could someone please sketch out a simple java script for me. I will have a document with one background
    layer and a layer set (group) called "Analyze" that consists of 63 adjustment layers. The layer names in that "Analyze" group(folder) will be
    "01" ...through "63" with 01 on the bottom and 63 at the top. Initially, all of the adjustment layers will be invisible and  the
    group will be closed (not expanded). I need a simple  script that will check for the first invisible layer in that group
    and make it visible without selecting that layer nor expanding the group. The script has to check
    for the first invisible layer every time it runs because other actions may have turned off a layer in the set.
    The point of this is so I can hotkey flipping on the layers one at a time without expanding the set or
    changing focus off the  background. It seems it should be a simple loop, but I just can't wrap  my head
    around all the objects (e.g. Layer as opposed to Layers  and  Artlayer as opposed to Artlayers)
    and the constants constants.
    for (i = 63; i>0; i--){                 /* I have found layer indexes 0 are the topmost layer */
      if( layerset[i] == INVISIBLE){
               layerset[i] = VISIBLE;
                  break;
    Could someone please write me a simple script that would do this?
    Edit I found this and its very close to what I need:
    var doc = app.activeDocument;
    for(var i = 0 ; i < doc.layers.length;i++){
      doc.layers[i].visible = (i % 2 == 0);
    From here : Function to show/hide layer with Photoshop script (JSX) - Stack Overflow
    In my case I would rewrite it to this
    for(var i = 62; i >=0; i--){
         if(  !doc.layers[i].visible){
              doc.layers[i].visible =TRUE;
              break;
    My problem is I just need  to traverse the layers in my layerset "Analyze"
    How do  I reference just those? Is there a doc.layersets["Analyze"].layers[i].visible = TRUE?
    Message was edited by: Shawn Laughlin To add more information

    Well this works:
    var doc = app.activeDocument;
    var analyze = doc.layerSets.getByName("Analyze").layers
    for(var i = 62 ; i >= 0; i --){
        if (!analyze[i].visible){
            analyze[i].visible =1;
            break;
    Hard to believe TRUE is not a constant in java.

  • Could someone please look at my line stats.

    Thank you for looking.
    Had a engineer out and checked line and changed my pear on telegraph pole.Lol. Plus went to local exchage (erm), and there is nothing more they can do(line wise). But my download speed is so slow. 360 and wii games keep dropping out and you tube keeps buffing. Not happy.
    ADSL line status Connection information
    Line state
    Connected
    Connection time
    0 days, 1:17:41
    Downstream
    7,712 Kbps
    Upstream
    448 Kbps
    ADSL settings
    VPI/VCI
    0/38
    Type
    PPPoA
    Modulation
    ITU-T G.992.1
    Latency type
    Fast
    Noise margin (Down/Up)
    6.7 dB / 25.0 dB
    Line attenuation (Down/Up)
    38.0 dB / 24.0 dB
    Output power (Down/Up)
    19.7 dBm / 11.9 dBm
    Loss of Framing (Local)
    0
    Loss of Signal (Local)
    0
    Loss of Power (Local)
    0
    FEC Errors (Down/Up)
    0 / 0
    CRC Errors (Down/Up)
    136 / 2147480000
    HEC Errors (Down/Up)
    nil / 0
    Error Seconds (Local)
    1892
    And speed test
    <script type="text/javascript">// paintProgressAndMessageOnBar(100,"The test has successfully completed"); // </script> Test1 comprises of Best Effort Test: -provides background information.
    Download  Speed
    5775 Kbps
    0 Kbps
    7150 Kbps
    Max Achievable Speed
     Download speedachieved during the test was - 5775 Kbps
     For your connection, the acceptable range of speeds is 600-7150 Kbps.
     Additional Information:
     Your DSL Connection Rate :7712 Kbps(DOWN-STREAM), 448 Kbps(UP-STREAM)
     IP Profile for your line is - 6500 Kbps

    the stats your showing there mean the problem isnt with your connection.
    most likley there is a problem with routing to the servers and a general problem with the iplayer being over subscribed, unless your on option 1 or 2 in which case your probably gettign throttled a lot.
    hopefully bt will fix the dns problem soon and things will get better

  • Could someone please help me with getting the sabnzbd daemon to start?

    Hi everyone,
    I'm a classic newbie.  I managed to follow some instructions I found on the web to get sabnzbd to install (via Yaourt), and when I invoke it from the command line, it works fine.
    I've read that you can get it to start as a daemon, which would be really good.  Could someone please explain how this should be done?
    Where do I need to put the sabnzbd.init file?
    What about the sabnzbd.confd file?
    I'm okay enough with adding sabnzbd to the /etc/rc.conf file, but I can't quite configure it so that the necessary files are in place to start it.
    If you need any details of my setup, please let me know.
    Thanks heaps,
    Luke

    birdie101 wrote:Where would I find a good place to describe how to install programs using PKGBUILDs?  and what that process is actually doing?
    Apart from the wiki article on ABS, always look at the pkgbuild when in doubt. This is also helpful when you want to know what compile arguments are passed to GCC. Custom postinstall commands are run through .install file (example what is displayed after installation), this is generally foo.install in the AUR for a pkg named foo. And most importantly, familiarize yourself with compiling process, and Arch specific routines like a daemon should be defined in /etc/rc.d/, instead of /etc/init.d/ in other linuxes.
    Edit: A best exercise would be to create a pkgbuild yourself. Arch always recommends community contributions.
    Last edited by shemz (2010-09-24 08:08:14)

  • HT1423 Could someone please fix the broken images for iMac 27 Oct 2013 instructions? I miss the webmaster's email on the bottom of the page...

    I know that's so 90s, but all the images for iMac 27 Mid 2013 are broken. Could someone please look into that?
    Thanks.

    I can see that too. I am referring to <http://support.apple.com/kb/HT1423?viewlocale=en_US#1>. This is the first link for iMac 27".
    Your screenshot refers to <http://support.apple.com/kb/HT1423?viewlocale=en_US#4>.
    This is what I see. I am still confident that this is a problem with the image link:

  • Could Someone Please Explain

    Could someone please explain why this has happened.
    This is not the first time I have seen this happen
    86.134.3.68 26.84 up 6.92 down 10ms 30/10/2014
    31.54.152.172 28.57 up 6.23 down 10ms  29/10/2014
    I had been connected for 13 days + hours and overnight bt did its thing with my HH3 and changed my
    ip address.
    So why after being connected with constant speed test results on ip 31.54.152.172 should my upload speed
    drop from 28.57 to 26.84
    Nothing has changed no powercuts no resets same equipment so why?

    They could well be rebalancing the gateways to share throughput more equally. There have been lots of reports of people getting massive slowdowns during peak hours.
    If you found this post helpful, please click on the star on the left
    If not, I'll try again

  • My husband and I both have types of IPods but we can not download any music to them because we have an Acer Android tablets. Could someone please help us to be able to download music to our IPods all we have is this tablet

    We have two types of Ipods. A nano generation 5 & a nano touch, and we are unable to download music to them was told its because we have an Acer Android tablet. Could someone please help us in solving this issuses cause we just bought these ipods and was not aware that and all we have is this tablet. .. Please help us

    Templeton Peck, the Android tablet  does not support iTunes
    Angs78, you purchase music from iTunes on the iPod touch. I know of no way to get music on the Nanao from the tablet.

  • Hi, i was wounding if anyone would help me get information on the company regarding the acquisition of, beats by dre, could someone please help me out as i am doing a college report on this and need some good sources of information

    hi, i was wounding if anyone would help me get information on the company regarding the acquisition of, beats by dre, could someone please help me out as i am doing a college report on this and need some good sources of information

    Try a search with Google.
    Why should we do your homework for you?

  • My iPhone 4s refuses to play sound when the headphones are not in. When the headphones are in however, it works perfectly fine! This is most annoying, could someone please help me :)

    My iPhone 4s refuses to play sound when the headphones are not in. When the headphones are in however, it works perfectly fine! This is most annoying, could someone please help me   I have not dropped it and it has not been in any contact with liquid.

    I just tried both of those things and to no avail. Here are some pictures if that will help

  • Hi, I need someone to help me change the login screen. The computer I have is a macbook, its second hand and probably around 3-4 years old. The previous owner had the login screen has a lego or something. Could someone please help me change this??

    Hi, I need someone to help me change the login screen. The computer I have is a macbook, its second hand and probably around 3-4 years old. The previous owner had the login screen has a lego or something. Could someone please help me change this??

    computerilliterate52 wrote:
    hi all, i hope someone is very computer litterate about java that is i have a dell 2400 pc windows xp 2, well since msn isnt downloading anymore java updates we all have to download a compatible one to our computer i use explorer and i can play www.iwin.com online games, yet when i go on to the msn browswer it wont load the games all i see is it just trying to load and load nothing said and nothing done. what could be wrong it works on ie and not msn browser? i have zone alarm, i have avg spyware tester and spyblaster, but i thought it may of kept me from downloading all this yet it worked on IE please help and i dont have flash player either it wont seem to work any and i mean any help is welcome.i tried to change the browser settings and did all that stuff i am on broadband DSL and they dont seem to know they say that isnt there job its msn's so i asked them and they said no it is quest broadband since i am with them i just get the run around i have IE 6.0 ihave java plug in 1.4.2. o3 yet it says not verified, i have java 1.6.o o1 i have java plugin 1.6.0 01 i have that twice ? dont know why. and java envirinmemet i have the right stuff cuz like i said it plays or works on explorer not msn browserer bar. i see no picture's in center of the page as it tries to load it is a blank page any help thank you i have been trying going on 3 weeks now thanksI agree with the other posters; try Firefox. It sounds like a bit of a mess and what you may need is an onsite PC tech to do some maintenance on your PC.
    Also, learning to properly use punctuation (particularly periods) might not be a bad idea. As it is, your post was very hard to read.
    Good luck!

  • Quicktime movie trailers still not playing, could someone please help me?

    I have not been able to watch any movie trailers from quicktime for two years now and this is really getting old.
    my inf!
    computer: DELL
    system: Windows XP SP2
    QT player version: 7.2
    I have all system requirments and updates also allready unselected derctX and selected safe mode, still all I get when loading the movie trailer from QT websight is the white box with QT logo in middle, sometime the logo will also have ?mark over it. I figured it was just taking its own sweet time loading so I wated it out. 4 hours later there was still no change. you'd think apple would have fixed or resolved this problem since it has been ongoing for last two or more years.
    Could someone please help me?????????
    Message was edited by: scarpredelder

    Try https://discussions.apple.com/thread/4890398?start=0&tstart=0
    See if that helps
    Allan

  • Could someone please help me with contact form php.

    Hi,
    could someone please help me wright the php for this contact form?
    <form class="contact_form" action="kontakt.php" method="post">
                <p><input type="text" required="required" id="contact_name" name="contact_name" class="text_input" value="" size="22"  />
                <label for="contact_name">Namn *</label></p>
                <p><input type="text" required="required" id="contact_company" name="contact_company" class="text_input" value="" size="22"  />
                <label for="contact_company">Företag *</label></p>
                <p><input type="email" required="required" id="contact_email" name="contact_email" class="text_input" value="" size="22"  />
                <label for="contact_email">Epost *</label></p>
                <p><textarea required="required" name="contact_content" class="textarea" cols="30" rows="5"></textarea></p>
                <p><button type="submit" class="button white"><span>Skicka</span></button></p>
                <input type="hidden" value="[email protected]" name="contact_to"/>
            </form>
    Its no sence writing down my php as it is useless.
    All help is appriciated.
    Thank you

    Please don't post duplicate threads. Continue the discussion in http://forums.adobe.com/thread/1080721.
    This thread is now locked.

  • HT1766 Hi there, could someone please help me, i didnt have my icloud on before my iphone 4s broke. I have always used iTunes and everything was backed up on there and now im finding it hard to restore my phone with contacts, photos etc.

    Hi there, could someone please help me, i didnt have my icloud on before my iphone 4s broke. I have always used iTunes and everything was backed up on there and now im finding it hard to restore my phone with contacts, photos etc.

        Dear Tylerkeefe,
    Good morning. Getting notifications that you are close to exceeding your allowance can certainly be alarming. It would be my pleasure to help put your mind at ease.
    I understand you are not streaming movies, music, etc. Which these features will use a lot of data. Are you using the Mobile Hotspot on your phone. This may also cause you to exceed your data allowance quickly if you do not power if off after you are done using the feature. To turn off mobile hostpot tap settings>general>personal hotspot>off. Do you have any third party applications that you have installed that may be running a lot of data?
    To ensure applications are not consistently running in the background do the following press the menu button at the bottom of your phone twice. All the open apps will then appear. Select and hold the bottom of the screen. A minus sign will then appear in the top left of each app. Select each minus sign to close out the application.
    I hope the information given will help clarify what is using a lot of data on your phone. Should you have further questions or concerns, please feel free to reach out to us.
    Thank You,
    MichelleS_VZW
    VZW Support
    Follow us on Twitter @VZWSUPPORT

  • I am concerned that my new mac screen seems to snaps a pic when I am on certain web sites,I then notice that the "preview" is tagged on. Could someone please explain let me know what may be happening and how to stop this?

    I am concerned that my new mac screen seems to snaps a pic when I am on certain web sites,I then notice that the "preview" is tagged on. Could someone please explain let me know what may be happening and how to stop this?

    Hey Dollydayle,
    The steps in this link can help you with moving your music to your new computer,  with several options you can choose from that best suit your needs:
    iTunes: How to move your music to a new computer
    http://support.apple.com/kb/HT4527
    Welcome to Apple Support Communities!
    All the best,
    Delgadoh

  • Could someone please help me . . .

    Hello,
    Could someone please tell me how to go about writing a java program that would be able to process a statement/sentence. How can I make it is so that when someone types in a statement/sentence and presses enter, the program calculates the total number of words in the statement and whether it ends with a period, question mark, or an exclamation. Could anyone start it off for me so I'd be able to see how it works. My textbook doesn't contain any samples that pertain to this. Just in case you have no idea what I'm talking about, here's what my handout says . . .
    Write a Java program to process a statement. You may assume that the statement contains a series of words each separated by exactly one blank space and ending with exactly one punctuation symbol which is either a �period � for a sentence�, �question mark � for a question� or �exclamation point � for an exclamation.� You may assume that the statement fits on one line, it does not wrap over more than one line. You may also assume that no other punctuation symbol is used other than the ending character of the statement.
    The program should output:
    1.     The type of statement processed (sentence, question or exclamation).
    2.     The total number of words in the statement.
    3.     The longest word in the statement � if multiple words are of the same longest length � output
    the first of those words found in the statement.
    4.     The shortest word in the statement � if multiple words are of the same shortest length � output
    the first of those words found in the statement.
    5.     The number of short words found in the statement (containing 1-3 characters).
    6.     The number of medium words found in the statement (containing 4-6 characters).
    7.     The number of long words found in the statement (containing 7 or more characters).
    Again, if someone would be kind enough to start it off for me or give me an example on how to go about doing it, I would greatly appreciate it !!!!!
    Thanks for your time,
    Ana : )

    public class Austin
    public static void main(String [] args)
    try {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String str = "";
    while (str != null) {
    System.out.print("> ");
    str = in.readLine();
    StringTokenizer st = new StringTokenizer(str, " ");
    /* analyze your tokens here */
    } catch (IOException e) {
    }

Maybe you are looking for

  • Installing Adobe Flash Player 11.5.502.146

    I push out new the updates to my clients thru GPO msi installer and browser still ask to update to the latest eventhoug I already have installed. Please advise.

  • Iphone 4s keeps restarting

    My iPhone 4S keeps restarting.  At first, it wouldn't lock so I let the battery wear all the way down.  It recharged, but then started prompting to power down as though I had was pressing and holding down the power button.  I would hit "cancel" to re

  • Viewing the way of a message through integration process

    Hey, I would like to check the lifecycle of a message through an integration process (IP). Therefore I took the ID of a message that triggers the IP.  Our IP have several sending steps and I would like to see the messages that will be send. In sxmb_m

  • How can I set up different camera rolls for my photos.

    Right now all my photos are in one roll. I'd like to be able to segregate them per event. Thanks Maggie

  • Having photo enlarge in Blog...need help

    I need to be able to double click on photo in blog and have it enlarge to full size. This question has been asked here before but was never answered as I can see. This is a must for me to do what I need to do. I appreciate any help. Thanks