Disabling selection of JSeparator in a JComboBox

Does anyone know how to disable the selection of a JSeparator in a JComboBox?
I'm using JRE 1.1.8.

The BlockComboBox example doesn't allow the selection of the separator, however there is no way to move past the separator by using the arrow keys of the keyboard.
I've tried to add a key listener, but for some reason the code never gets executed when hitting a key.
Is there a problem with using key listeners with a JComboBox?

Similar Messages

  • Need script to disable selected users in BOEXI 3.1

    Hi,
    I am looking for a script to disable selected users. I have a query builder query which I want to use in that script to disable users.
    SELECT SI_NAME, SI_LASTLOGONTIME, SI_CREATION_TIME FROM CI_SYSTEMOBJECTS WHERE SI_NAME NOT IN ('ADMINISTRATOR','GUEST') AND SI_KIND='USER' AND SI_CREATION_TIME <= '2012.12.31' AND SI_LASTLOGONTIME IS NULL ORDER BY SI_NAME
    Please help.
    Regards,
    Lokesh

    Received following error:
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    org.apache.jasper.JasperException: Exception in JSP: /disableuser.jsp:52
    49:     Object[] objs = boAliases.toArray();
    50:  
    51:     // Get the first one
    52:     IUserAlias myAlias = (IUserAlias)objs[0];
    53:  
    54:     // and disable it
    55:     myAlias.setDisabled(true);
    Stacktrace:
    org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:506)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:395)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    root cause
    java.lang.ArrayIndexOutOfBoundsException: 0
    org.apache.jsp.disableuser_jsp._jspService(disableuser_jsp.java:100)
    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:334)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    I restarted tomcat and cleared cache as well.
    Regards,
    Lokesh

  • How to disable selection of root node in JTree

    Hi all! Thanks for taking a minute to read my post!
    I am writing a really basic JTree for showing a list of items.
    Here is some of the code:
    /** Create a basic tree **/
    DefaultMutableTreeNode rootNode = new DefaultMutableTreeNode("Title");
    DefaultTreeModel treeModel = new DefaultTreeModel(rootNode);
    JTree tree = new JTree(treeModel);
    /** Method to return the string of the current highlighted selection **/
    public String getSelectionString()
    DefaultMutableTreeNode node =
    tree.getSelectionPath().getLastPathComponent();
    return (String)node.getUserObject();
    I would like to disable selection of the root node of my JTree.
    Thus, if I make a call to getSelectionString() above, it would return null instead of the string that represents the root label.
    I have read the following forum on disabling various TreePaths and TreeNodes in a JTree:
    http://forum.java.sun.com/thread.jsp?forum=57&thread=224691
    This forum suggests implementing the TreeSelectionListener interface and the TreeSelectionModel class and over-riding the addSelectedPath() methods. I tried this suggestion, and I was able to enable and disable the different children of the Jtree, but the root of the JTree would not disable.
    I suppose that I could just simply remove the visibility of the root node, but I really want to avoid that option if possible.
    Wait --- let me be clear ---- I want to disable the selection of the root node only - still allowing selection of all its children.
    Any suggestions?
    Am I missing something really simple here?
    Did I explain my problem clearly?
    Thanks in advance!
    jewels

    simply try this..
    in the
    public void valueChanged(javax.swing.event.TreeSelectionEvent event);
    method of TreeSelectionListener impelentation get the
    TreePath tp = event.getPath();
    from TreePath get the component and then remove the selection from the treePath if it is the node u were checking/root node in this case
    tree.getSelectionModel().removeSelectionPath(tp);
    Try out....

  • Disable select one choice in adf table

    Hi, my requirement is that based on value of input text i have to disable select one choice(soc1) in adf table.
    suppose i have to disable soc1 on value of input text i have used *#{row.bindings.Dependenttaskid.inputValue=='30'} it's working fine.*
    But my requirement is that i have to disable soc1 checking value from two input text
    When i am using operator from expresion builder like *#{row.bindings.Dependenttaskid.inputValue=='30'}and#{row.bindings.Tasklocationid.inputValue=='OUTSRC'}*. it is not showing error but it's not working .
    Can anyone suggest how to use orperator from expression builder.
    Thanks a lot!

    you can override isAttributeUpdateable is your viewRowImpl class like this code
    public boolean isAttributeUpdateable(int i) {
    //you can add your condition here
    if (this.getDependenttaskid().equal("30") && this.getTasklocationid().equal("OUTSRC") && i==YouLOVAttributeEnum)
    return false;
    else
    return super.isAttributeUpdateable(i);
    }check [url http://mjabr.wordpress.com/2011/07/08/control-row-updatability/]Control row updatability – part 1

  • How to disable "Selection Security" in a correct way?

    hi experts!
    how to disable "Selection Security" in a correct way?
    !http://img689.imageshack.us/img689/2748/28668107.png!
    thanks!

    Hi...
    Open "Catalog Manager" and
    navigate to Shared -> "Shared Folder Name" (ex: Sample Sales) -> _Portal.
    Here you find all dashboards. Open the dashboard that you already enabled selection. In that dashboard folder you find one more folder with name: _selections*
    Delete the _selections* folder.
    You will get Enable option again in front end.
    All the best

  • Disable selection parameter in Query

    Hi,
    I would like to disable selection parameter in query.
    I add below coding in SQ02 "at selection-screen output" but it cannot work. Any solution besides use variant to disable it?
    loop at screen.
      if screen-name = 'pa_date'.
        screen-input = '0'.
        modify screen.
      endif.
    endloop.
    Thanks.

    Hello Winnie,
       Yes you can. Try this one:
    <><><><><><><><><><><><><><><><><><><><><><><><><><><>
    Parameters: aram1  like mara-matnr.
    AT SELECTION-SCREEN OUTPUT.
      loop at screen.
        if screen-name eq 'PARAM1'.
          screen-input = 0.
          modify screen.
        endif.
      endloop.
    <><><><><><><><><><><><><><><><><><><><><><><><><><><>
    Happy coding!

  • Disable selection of certain items in ListView

    I have a ListView with different items.
    For most items I like the default multiple selection but for some items I would like to disable selection completely.
    I tried disabling the cell while it displays a non selectable item, but this only disables selection from direct events on the cell. I can still select it by clicking on an item above an then shift-clicking on an item below.
    I also tried to set the cell as empty when displaying a non selectable item. This fixes the issue with shift selection described above, but i can still select the cell by selecting an item next to it and pressing the respective arrow key.
    Does anybody have an idea?
    Thanks
    l2p

    How about this?
             final ListView<Node> fileList = new ListView<Node>();
            fileList.getSelectionModel().selectedIndexProperty().addListener(new ChangeListener<Number>() {
                @Override
                public void changed(ObservableValue<? extends Number> observableValue, Number oldv, Number newv) {
                    if (newv.intValue() == 4) {
                        fileList.getSelectionModel().select(oldv.intValue());
            });

  • How can I disable Select Tool & enable Hand Tool using Adobe JavaScript ?

    How can I disable Select Tool & enable Hand Tool using Adobe JavaScript ?
    I want wherever the PDF opened automatically preferrence changed, default HAND TOOL remain selected. I want to do it using Adobe JavaScript.

    You are correct in that it's not functioning, however I do not have that option under the "online and adobe online" section in Adobe Customization Wizard XI.  I have the following boxes that can be checked:
    "Disable initiating shared reviews and data collection via distributed forms using Adobe online services (does not affect non Adobe online services reviews and forms).
    "Disable the Tools pane in Reader"
    "Disable file storage on Adobe online services"
    "Enable file storage even when all other services are disabled"

  • Enable / Disable selection screen block

    Hi, could u pls tell me how do I enable/disable selection screen block written below based on radio button selected??
    Block to be enabled / disabled :
    *----APO Version and RFC destination block
    SELECTION-SCREEN BEGIN OF BLOCK b4 WITH FRAME TITLE text-013.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 01(20) text-e11.    "APO Planning Version
    SELECTION-SCREEN POSITION 29.
    SELECT-OPTIONS s_apover FOR w_version NO INTERVALS.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 01(20) text-e09.    "APO RFC Destination
    SELECTION-SCREEN POSITION 32.
    PARAMETERS  :  p_aporfc LIKE rfcdes-rfcdest.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK b4.
    Radiobuttons :
    Material Type
    SELECTION-SCREEN BEGIN OF BLOCK ss04 WITH FRAME TITLE text-072       .
    PARAMETERS :
         Load only FERTs
           p_FERT  RADIOBUTTON GROUP styp DEFAULT  'X' USER-COMMAND rusr ,
         Load ROH/HALBs
           p_HALB  RADIOBUTTON GROUP styp                                .
    SELECTION-SCREEN END   OF BLOCK ss04                                 .
    Thanx in advance

    Hi
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    PARAMETERS: pa_file TYPE rlgrap-filename MODIF ID abc,
    pa_lifnr TYPE lfa1-lifnr MODIF ID abc,
    pa_vkorg TYPE vbak-vkorg MODIF ID abc.
    SELECTION-SCREEN END OF BLOCK b1.
    SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.
    PARAMETERS: pa_kunnr TYPE vbak-kunnr MODIF ID def.
    SELECT-OPTIONS: s_lifnr FOR gs_lfa1-lifnr MODIF ID def,
    s_date FOR gs_lfa1-erdat MODIF ID def,
    s_augru FOR gs_vbak-augru MODIF ID def,
    s_vbeln FOR gs_vbak-vbeln MODIF ID def.
    SELECTION-SCREEN END OF BLOCK b2.
    SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE text-003.
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS: pa_upd RADIOBUTTON GROUP g1 USER-COMMAND uc01 DEFAULT 'X'."#EC *
    SELECTION-SCREEN COMMENT 3(60) text-004 FOR FIELD pa_upd.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS: pa_rep RADIOBUTTON GROUP g1 ."#EC *
    SELECTION-SCREEN COMMENT 3(60) text-005 FOR FIELD pa_rep.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK b3.
    IF pa_rep EQ gc_x.
    LOOP AT SCREEN.
    IF screen-group1 = gc_abc.
    screen-input = gc_zero_num.
    ELSEIF screen-group1 = gc_def.
    screen-active = gc_one_num.
    ENDIF.
    MODIFY SCREEN.
    ENDLOOP.
    ELSEIF pa_upd EQ gc_x.
    *For Reprocessing
    LOOP AT SCREEN.
    IF screen-group1 = gc_def.
    screen-input = gc_zero_num.
    ELSEIF screen-group1 = gc_abc.
    screen-active = gc_one_num.
    ENDIF.
    MODIFY SCREEN.
    CLEAR pa_upd.
    ENDLOOP.
    ENDIF.
    REPORT zrich_001.
    PARAMETERS: p_rad1 RADIOBUTTON GROUP grp1 DEFAULT 'X'
                            user-command chk,
                p_rad2 RADIOBUTTON GROUP grp1.
    SELECT-OPTIONS: s_datum1 FOR sy-datum MODIF ID d1,
                    s_datum2 FOR sy-datum MODIF ID d2.
    AT SELECTION-SCREEN OUTPUT.
      LOOP AT SCREEN.
        IF p_rad1 = 'X'
          AND screen-group1 = 'D2'.
          screen-active = '0'.
        ENDIF.
        IF p_rad2 = 'X'
         AND screen-group1 = 'D1'.
          screen-active = '0'.
        ENDIF.
        MODIFY SCREEN.
      ENDLOOP.
    Regards
    Anji

  • JTextArea  / Disabling selection

    Im getting a bit frustrated with this, hence my post....
    I have a JTextArea, in which will contain various text.
    The component should not be editable, and likewise should not be selectable.....
    I still have not found a way to disable text selection in a JTextArea, in fact any subclass of JTextComponent for that matter.
    why setEnabled(false) does not prevent selection is beyond me........
    I had a similar problem once before, and my solution was to set selection color to thed, which worked just fine, despite not really solving the problem....
    I would probably go ahead and use this technique again, however I have a different situation here, Im using a translucent background, (0,0,0,0) and setting selection color to this value does not seem to work...
    Is there a way to totaly disable selection???
    Should I possibly use a different component to handle the task, which does not support selection, ( Ihavent found anything yet). I need to have line wrap so a few of the more basic components are out of question....
    Im hoping some would give me some suggestions on this, they will be greatly apreciated, and as always adequately rewared....
    Thanks
    J.Prisco

    I had a non-editable JEditorPane which I didnt want to select its text, if I'd set it to setEnabled(false) whenever I would've cross a hyperlink, The cursor would not change to a Hand-Cursor (because the comp. is disabled)
    So, What I did was just "disabling" the selection (not the comp.) by setting my own Caret as follows:
            JEditorPane lbl = new JEditorPane();
            lbl.setCaret(new javax.swing.text.Caret()
                public void install(javax.swing.text.JTextComponent c){}
                public void deinstall(javax.swing.text.JTextComponent c){}
                public void paint(Graphics g){}
                public void addChangeListener(ChangeListener l){}
                public void removeChangeListener(ChangeListener l){}
                public boolean isVisible(){return false;}
                public void setVisible(boolean v){}
                public boolean isSelectionVisible(){return false;}
                public void setSelectionVisible(boolean v){}
                public void setMagicCaretPosition(Point p){}
                public Point getMagicCaretPosition(){return new Point(0,0);}
                public void setBlinkRate(int rate){}
                public int getBlinkRate(){return 10000;}
                public int getDot(){return 0;}
                public int getMark(){return 0;}
                public void setDot(int dot){}
                public void moveDot(int dot){}
            });Again I remind you that this will only work good for non-editable text components...
    Cheers
    Eyal

  • Bex 2004s - Disabling Selection Sreen of a Query for the purpose of Views

    Hi,
    Is there possibility in Bex 2004s, where in we can disable Selection Sreen of a Query for the purpose of creating multiple Views.
    Thanks
    Praveen

    Hi,
    There is no posibility to disable the selection secren if there are any variables defined on a query. it can be done on the web applications side by inserting the command VARIABLESCREEN=" ". in this also it is only possible if there are no mandatory variables defined on the query.
    thanks

  • Disabling selecting label text

    Hi
    I just noticed that by pressing on a label on a touch screen devices the text become selected. Only way I found was to cover the label with rectangle. However the rectangle reduced gallery performance specially on surface2 device. So is there
    any solutions to disable selecting text without disabling whole label? I'm using label OnSelect behaviour so I can't disable whole label 

    Hello,
    Similar for round buttons which look "smart" when developing for touch.
    For now I duplicate the function in the label and the shape but that's removing some of the cooler effects you can default on a button (press, etc.)
    Regards
    StonyArc
    http://www.stonyarc.com http://www.xboxlivenation.com

  • How set disable select matrix column header

    How set disable select matrix column header same Inventory-->Pick List Form
    Thanks Advance.

    Hi ,
    do u mean Price List Form Header...
    If Yes Means Try the Following,
    select case pVal.FormType
    case "155"
    Select Case pVal.Before_Action
    case True
    select case pval.ItemUid
    case "3"
    Select Case pVal.EventType
    Case SAPbouiCOM.BoEventTypes.et_CLICK
    if pval.row = 0  Then BubbleEvent = False : Exit Sub
    End Select
    End Select
    End Select
    Regards,
    Ganesh k

  • How to disable selection parameter for a particular radio button

    hi experts,
    How to disable selection parameter(bukrs) for a particular radio button 'radio1'.

    hi,
    Check This Code (copy paste and run it ).
    U have to use MODIF ID along with the parameter.
    *----------------Option
    *---Background
    *---Summary Report
    PARAMETERS       : p_backgd RADIOBUTTON GROUP rad1
                       USER-COMMAND radio DEFAULT 'X'.
    PARAMETERS       : p_sumrep RADIOBUTTON GROUP rad1 .
    *----------------File
    PARAMETERS       : p_sumfl TYPE char255 modif id ABC  .
    PARAMETERS       : p_detfl TYPE char255 modif id ABC.
    *---------------Activate & Deactivate Screen Fields--------------------*
    AT SELECTION-SCREEN OUTPUT.
      LOOP AT SCREEN.
        IF p_sumrep = 'X'.
          IF screen-group1  = 'ABC'.
            screen-input  = '0'.
            MODIFY SCREEN.
          ENDIF.
        ENDIF.
      ENDLOOP.
    <b>Please Reward Points & Mark Helpful Answers</b>
    To mark Helpful Answers ;click radio Button next to the post.
    RadioButtons
    <b>o</b> Helpful Answer
    <b>o</b> Very helpful Answer
    <b>o</b> Problem Solved.
    Click any of the above button next to the post; as per the anwers
    <b>To close the thread; Click Probelm solved Radio Button next to the post ,
    which u feel is best possible answers</b>

  • Disable Select-Options Tabstrips

    Hi,
    Does anyone know how to disable select-options dialog box's tabstrips? Standard multiple selection dialog box comes with 4 tabstrips (single values, ranges values, excluded single values, and excluded ranges value). I would like to disable one of these tab, does anyone work with this before.
    Thanks,
    SP

    Hi Seng,
    Please use NO EXTENSION NO INTERVAL
    for further help please go through KEY word documentaion.
    Regards
    Ramchander Rao.K

Maybe you are looking for