To hide JSpinner with a checbox?

     private SpinnerNumberModel alarmIntervals = new SpinnerNumberModel(DEF_TIME_ALARM, DEF_TIME_ALARM, DEF_TIME_ALARM*QUARTERS_DAY, DEF_TIME_ALARM);
     private JSpinner alarmIntervalSelector;
private JCheckBox alarmOption;
          alarmOption = new JCheckBox(ALARM);
          alarmIntervalSelector = new JSpinner(alarmIntervals);
          alarmIntervalSelector.setVisible(false);
          buttons.add(alarmOption);
          alarmOption.addActionListener(this);
          buttons.add(alarmIntervalSelector);
     public void itemStateChanged(ItemEvent selectedItem){
                        if (selectedItem.getSource() == alarmOption){
                    if (selectedItem.getStateChange() == ItemEvent.SELECTED){
                    alarmIntervalSelector.setVisible(true); frame.pack();
                     } else if (selectedItem.getStateChange() == ItemEvent.DESELECTED){
                    alarmIntervalSelector.setVisible(false); // should disable alarm?
                    frame.pack();
        }These are snippets of the code that seem not to work. Basically I'm trying to hide a component (JSpinner) until the checbox is selected, and vice versa. Yet in the implementation clicking on the checkbox does nothing (should display the jspinner).

Use the Terminal application. The command is "SetFile" (no quotes, and case is important.) You can run the command line, man SetFile, to get instructions on usage. To set the invisible attribute, for example, SetFile -aV fileorfoldername.
HAPPY HOLIDAYS!
Kappy
Why reward points?(Quoted from Discussions Terms of Use.)
The reward system helps to increase community participation. When a community member gives you (or another member) a reward for providing helpful advice or a solution to their question, your accumulated points will increase your status level within the community.
Members may reward you with 5 points if they deem that your reply is helpful and 10 points if you post a solution to their issue. Likewise, when you mark a reply as Helpful or Solved in your own created topic, you will be awarding the respondent with the same point values.

Similar Messages

  • Plz tell me how to use JSpinner with JTable

    I have retrieve records from database but as the number of records(rows) are more than 1000 , i want to use JSpinner with JTable . plz solve my problem by giving the appropriate code for the same.

    hi
    check this links
    http://www.exampledepot.com/egs/javax.swing.table/CustRend.html
    http://java.sun.com/docs/books/tutorial/uiswing/components/table.html
    hope this will help you.. this explains exactly what you want.
    regards
    Aniruddha

  • New solution for Limit the value in JSpinner with changable max/min value

    I have ever stuck with a problem like that :
    1. My application need to get two int value A and B that user input.
    I use two JSpinner with Number format model.
    named in jSpinnerFrom (A value get from) jSpinnerTo (B value get from)
    2. The request is that :
    two value can be any Integer, But the value of (B - A) can not more than 1000.
    I use changeListener added into the JSpinner, when use set value make (B-A) larger than 1000, I set value back.
    But when user press mouse on arrow button, the value will be increase automaticaly, and at last the value can not set back that make (B-A) not larger than 1000.
    3. So I get the BasicArrowButton of the jSpinnerFrom and jSPinnerTo,
    and add a mouselistener on the arrowbutton. When mouseReleased, then chen the value (B-A), if it is larger than 1000, then set it back the proper value.
    Thus I can make the min/max value in the JSpinner be changable, and limit the two input value be in range of 1 - 1000
    Post this wish be help for any one has thus familar request.
    Good Luck!!

    Something like this might work
    import javax.swing.*;
    import java.awt.*;
    import javax.swing.event.*;
    class Spin extends JFrame implements ChangeListener
      JSpinner spinner1;
      JSpinner spinner2;
      JPanel jp;
      public Spin()
        setDefaultCloseOperation(EXIT_ON_CLOSE);
        setSize(200,75);
        setLocation(400,300);
        spinner1 = new JSpinner(new SpinnerNumberModel(1000, 1000, 9999, 5));
        spinner1.addChangeListener(this);
        spinner2 = new JSpinner(new SpinnerNumberModel(0, 0, 1000, 5));
        jp = new JPanel();
        jp.add(spinner1);
        jp.add(spinner2);
        getContentPane().add(jp);
      public void stateChanged(ChangeEvent ce)
        int s1 = ((Integer)spinner1.getValue()).intValue();
        jp.remove(spinner2);
        spinner2 = new JSpinner(new SpinnerNumberModel(s1-1000, s1-1000, s1, 5));
        jp.add(spinner2);
        validate();
      public static void main(String[] args) {new Spin().setVisible(true);}
    }

  • How to hide applications with out having to type command+option+H?

    How can you hide applications with out having to type command+option+H?

    Click the middle bubble/button.  The app will "move" in the dock to the far right next to the trashcan.

  • Hide Series with no data

    Dear friends,
    please your help with this issue.
    I have 2D column chart with multi Series, is there any way to hide series without date.
    i.e.. series depends on parameter i want to hide the Series if I did not enter the Series parameter.
    I hope that was clear.
    thanks all

    Hi,
    As far as I know, the "Hide items with no data" of slicer works for the values category in the pivot table. If the values category in the pivot table is empty, the slicer will hide the rows. And the other situations (we do not put the data in values
    category), it'll not hide the rows. Because the rows are also the records of the data source. (It also applies to the table in Excel 2013)
    Thanks,
    George Zhao
    TechNet Community Support

  • JSpinner with two date values

    Hi,
    how is it possible, to create a JSpinner with hour and minute values?
    like: 10.45 (24H)
    By pressing the next value button, the time should be increased at 15 minutes. The previous button should decrease at 15 minutes.
    thanks

    Check out the link shown below:
    http://java.sun.com/j2se/1.4.1/docs/api/javax/swing/JSpinner.DateEditor.html
    ;o)
    V.V.

  • Use JSpinner with JTable

    I have retrieve records from database but as the number of records(rows) are more than 1000 , i want to use JSpinner with JTable. How can i do so?

    you can start by being more clear on what your requirements are.

  • Hide folios with not entitlements

    Hi need to hide the folios for users that don't have rights to see them. Or if the user is not logged in.
    I'm implementing a custom library in android following the  Android Combined Library and Store  example found here DPS Configurator.
    I'm calling updateLibrary when the user login and out.
    in the updateLibrary documentation it says:
    Start a library update transaction. This may only be called if there is not already an ongoing library update transaction. When the update transaction is completed, the library will be finished being updated from the fulfillment server. However, this does not mean that entitlements will be updated from the entitlement server. The entitlements will be updated sometime after the library update completes. 
    the question is how do I know when the entitlement for the folios is updated?

    The API version used for your entitlement server doesn’t make a difference. The flow you are trying in your custom library is correct, it is the same flow we use in the native application.
    If it isn’t working as you expect you should open a support request with our enterprise support line. Sign in to http://digitalpublishing.acrobat.com/ and look in the bottom middle of the screen for contact information.
    Neil

  • How to hide rows with merged cells?

    I would like to know how to hide rows on numbers with merged cells, could do it normally at excel but I am not being able to do it at Numbers.
    thanks!

    Felipe,
    To hide a row with Merged Cells, Un-Merge first, then Hide. Select the Merged Cells and Table > Unmerge.
    Note that this is only a problem with vertically merged cells when you want to Hide a Row.
    If you want to Hide a Column, you can't have a Horizontal Merge that involves that Column.
    Jerry

  • Hide/show with NO TEMPLATE regions... and htmldb_ToggleWithImage Q

    Hi, everybody.
    Q : Is it possible to make NO TEMPLATE regions work like Hide/Show regions?
    (http://htmldb.oracle.com/pls/otn/f?p=17109:5:1474490190980004:::::)
    Thnks.
    Message was edited by:
    mishkar

    Actually i already solved this issue. If U R interesting Y do V need this, look here
    http://htmldb.oracle.com/pls/otn/f?p=17109:5:1840045891588230::NO
    (Hide/Show tab)
    U will C what kind of disign V R using (regions without templates)
    So, it works fune ... in here. In our working environment it is not working. It doesn't give any errors. It just doing NOTHING when clicking on the box. I believe it is this line that doesn't work onclick="htmldb_ToggleWithImage(this,'left_region')".
    So the Q is : what is "htmldb_ToggleWithImage", and where to look for it. Somewhere on the forum i found that this is a java script. So, does it live in UNIX (operating system)? How to find it? And what can be wrong with it?....
    Thnks a lot.
    Mike

  • Show-Hide Navigation with sub-nav

    Hi,
    I'm trying to create a navigation that will show/hide on
    mouse on/off. Now, I've managed to get the first level to work, but
    struggling with the sub-nav.
    I have an MC (that contains the animation) that uses hitTest
    for the show/hide which allows the buttons inside the mc to work.
    I've tried a few ways to get the Sub-Nav to work but banging
    my head against a brick wall... can anyone help or point me in the
    right direction??
    You can get the files from here if required:
    Flash
    Files (FLA/SWF)
    Files are CS3 - AS2.0
    Mucho Appreciato!

    Found method, just using
    AdfmfContainerUtilities.showNavigationBar();
    AdfmfContainerUtilities.hideNavigationBar();

  • Hide SSID with Hub 3

    Hi,
    just got a new Hub 3 but as I've got some legacy devices that connect wirelessly but can only use WEP I've had to switch from WPA2 to WEP and wish to hide my SSID.  I found this post....
    http://community.bt.com/t5/BB-Speed-Connection-Issues/how-to-hide-ssid-on-the-new-hub-3-0/m-p/217965...
    which implies that hiding SSID is not available on Hub 3.
    soooo I just want to confirm that this "useful security precaution" is no longer available at all with Hub 3 (as opposed to is not available with Hub 3 configured for WPA2).
    Thanks.

    Is it possible to update the drivers or firmware for these devices?
    You could simply add a separate wireless access point for these devices, that uses MAC filtering and can hide the SSID.
    There are some useful help pages here, for BT Broadband customers only, on my personal website.
    BT Broadband customers - help with broadband, WiFi, networking, e-mail and phones.

  • Hide UIPickerView with animation

    Hi,
    I've added a UIPickerView programmatically and I'd like to dismiss it with an animation (not with picker.hidden = YES).
    Could you explain me how to do this?

    Hello,
    I would suggest you to hide your axis and to set your camera position during the creation phase of your animation wihtin A3D Reviewer.
    you will find more inforamtion under the A3D Reviewer docuementation
    Launche A3DR, Press F1 key and browse the animation chapters...
    Hope it helps
    William

  • Hide  lines with empthy value

    Dear Gurus
    I'm using BEX Query Designer with BI7 and want to hide to result rows that does not contain any values
    Can anyone guide me on setting this
    Thanks in advance
    BR
    Saravanan Ramasamy

    Hi.
    You can use zero suppression.
    Goto Query Properties->Rows/Coulumns->Suppres Zeroes->Active
    Regards.

  • Hide objects with checkbox

    I am trying to hide or disable a timer with a checkbox using advanced conditional actions which I am currently failing at. Is it possible if not what are the alternatives aside from a button

    You have two widgets or interactions in the same location, or better, they do overlap physically. Don't do that.
    I suppose that the user variable (hope it is defined) 'Checkboxenabled' is defined? It is not automatically created because you enter it in the Properties of the Checkboxes widget/interaction.
    You still didn't tell which version you are using, from the functionality of the advanced actions dialog box, I think it is 7.0.0. Why didn't you install the patch to 7.0.1?
    Which event do you use to trigger the advanced actions? Timer and Checkboxes are both static, they don't have an event to trigger an action. I suspect that is what is happening, you have an action but it is never triggered.
    Events and (advanced) Actions - Captivate blog
    Lilybiri

Maybe you are looking for