JOptionPane-how to disable a single choice

Hi
Can someone please guide me how to disable a single hoice in the JOptionPane class.what i want is like this
i the dropdown box i have five choices
a
b
c
d
e
now i want that choice b should not be highlighted and the user should not be able to select choice b but he should be able to see it.I don't have a clue how to do this,any help is welcome

I'm thinking you might end up having to implement your own
ListSelectionModel, perhaps extending DefaultListSelectionModel, and
have it ignore the items you don't want selected. You would then need
to get the list from the combo box and set this selection model on that
list. Unfortunately, looks like you'll have to go in through the L&F
classes to get at this list.
: jay

Similar Messages

  • How to disable a single cell in a table (and not the whole column)

    Hi there,
    I've got a webdynpro table with a few columns, rows can be created dynamically through a button in the table toolbar.
    Depending on the value of a certain cell I have to disable another cell (in the same row).
    I tried to manipulate the view in the modifyview but no joy. I also tried to manipulate the attribute property through the coding below:
      DATA lv_knttp TYPE knttp.
      lo_nd_kostl = wd_context->path_get_node( path = `MULTIVALUES.KOSTL` ).
      lo_el_kostl = lo_nd_kostl->get_element( ).
      lo_el_kostl->set_attribute_property(
      attribute_name = 'LTEXT'
              property       = lo_el_kostl->e_property-enabled
              value          = ''
    but it disables the whole column!!!! I just need the cell to be disabled (I thought the code above, through the lead selection, would affect a certain cell only - but I was wrong).
    Any ideas?
    Thanks!!!

    Hi,
    using cell variants you can do this.,
    check this article: [Cell Variants in WDA|http://wiki.sdn.sap.com/wiki/display/WDABAP/WebDynproforABAPCellVariants]
    Instead of binding the read only property of table as a whole , just bind the read only property of column group of table., You can do this bu drill down the table and select the required column and bind the read only column.,
    then In onAction Event of button .,
    loop the table, if condition satisfied set the read only property to true else false.,!!
    hope this helps u.,
    Thanks & regards,
    Kiran

  • How to disable one single element in a 2D array?

    Hello,
    I would like to disable one element in a 2D array. its size is constant at least.
    I can change its value by using a 1D array of cluster, but I can't use the property mode easily to disable an element.
    If you have any idea, it will be great.
    Thank you for your help.
    Lolopuf

    Right click on the particular control you want to disable and change the properties on that.  To do it programmatically, create a reference for that specific control and set the Disabled property for that.
    Attachments:
    Example_VI.png ‏15 KB

  • How to disable a single row of a multi-line text item

    I am trying to disable a date and a price on each row where the date is current or in the past (on theory the user can't update reference data that is in effect or past, only data which is not yet in use). It appears that forms 6i will make this an all-or-nothing matter, all rows (for a given text item) are enabled or all rows are disabled - no mixing! I am hoping forms is smarter than that, can someone give me knowledge? note: this is not a problem of enabling or disabling at runtime, I have that figured out, only row-specific application of the concept. here is my code:
    for c1rec in get_fees loop
    :cfee_def_dtl.service_fee := c1rec.service_fee;
    :cfee_def_dtl.eff_date := c1rec.eff_date;
    go_item('cfee_def_dtl.holdx'); -- inncouous field, not visible to user, but navigable
    IF trunc(c1rec.eff_date) <= trunc(sysdate) THEN
    set_item_property('cfee_def_dtl.eff_date',ENABLED,PROPERTY_FALSE);
    set_item_property('cfee_def_dtl.service_fee',ENABLED,PROPERTY_FALSE);
    END IF;
    next_record;
    end loop;

    Hi,
    move the logic in New-Item-Instance trigger and based on your condition
    SET_ITEM_INSTANCE_PROPERTY update_allowed as property_false/true.
    Monica

  • How to disable the single radio button in radionbuttongroup????

    Hi Experts,
      I created the RadiobuttonbyKey UI element and i have set it to the SimpleType which has two values.Say Ex:
        Simple Type : 1 bus
                             2 train
    My Requirement is onActionxxxx i have to display only one raiobutton in the Group and onActionyyyy i have to show both the radiobuttons in the group.
    Can anyone please help me how to achieve this..............
    Regards,
    Mahesh

    hi Mahesh ,
    which UI element you are using ......radio button group is group by key or group by index  ?
    if it is group by key above specified code holds ,
    if is group by index , then you have bind a node of cardinaility 0...n and with one attiribute in that node.
    in onActionxxxx()
       wdcontext.nodeRadioButton().invalidate();
    IPrivateDynamicTableView.IRadioButtonElement element;
    element = wdContext.createRadioButtonElement();
    element.setValueRadioButton("Train");
    wdContext.nodeRadioButton().addElement(element);
    and in onActionyyyyy()
    wdcontext.nodeRadioButton().invalidate();
    IPrivateDynamicTableView.IRadioButtonElement element;
    element = wdContext.createRadioButtonElement();
    element.setValueRadioButton("Train");
    wdContext.nodeRadioButton().addElement(element);
    element = wdContext.createRadioButtonElement();
    element.setValueRadioButton("Bus");
    wdContext.nodeRadioButton().addElement(element);
    Regards
    Govardan Raj

  • How to disable one email account in iPlanet Messaging Server 4.5

    Hi,
    Any one can tell me how to disable a single user in iPlanet Messaging Server 4.5.
    Thanks
    Abid

    I wonder what product you're really talking about.
    There was never a product called, "Netscape Messaging Server 4.5". There was 4.1 and 4.15, but the next product was 5.0.
    These are all long discontinued, and nobody should be using them anymore.
    Assuming it's 4.1, check your ldap record for "inetuserstatus" and set it to "disabled", or even "deleted"

  • I created a form with Single Choice fields, 4 days with times listed. But, I want the user to only be able to choose one time, and the time chosen to be unavailable for other users. How do I do this?

    I created a form with Single Choice fields, 4 days with times listed. But, I want the user to only be able to choose one time, and the time chosen to be unavailable for other users. How do I do this? I have 4 blocks of Single Choice fields in order for the summary page to give me each day in the final report. But, I need the user to be able to make a selection of any day and time and that apointment to no longer be available to future users when they log in. Plus, when the user clicks on the time, they are unable to change their mind and choose another time. Here's the link if you want to see what I'm talking about: 2015-2016 Workload Apportionment Review

    I'm afraid not.    It's not rocket science but you need to do some coding. 
    You'll need to find a script (php) and save it to your local site folder.  Then reference the script in your form's action attribute like so.
         <form action="path/form-to-email-script.php" >
    The input fields in your HTML form need to exactly match the script variables. 
    I'm  assuming you're hosted on a Linux server which uses PHP code.  Linux servers are also case sensitive, so upper case names are not the same as lower case names.  It's usually best to use all lower case names in your form and script to avoid confusion.
    Related Links:
    Formm@ailer PHP from DB Masters
    http://dbmasters.net/index.php?id=4
    Tectite
    http://www.tectite.com/formmailpage.php
    If this is all a bit beyond your skill set, look at:
    Wufoo.com (on-line form service)
    http://wufoo.com/
    Nancy O.

  • How to disable iMessage for a single contact?

    Hello apple communites, I have a simple and hopefully simple to answer question..
    I am curious as to how to disable iMessaging for a single contact.  My sister when she got her phone number originally had an iPhone, she has since gotten an android and kept the same phone number.  However I am running into issues with text messages to her, my phone still thinks she has an iPhone and continues to send every text as an iMessage, resulting in a failed message.  I can easily hit the "send again as a text message" option and the message/picture sends as normal.  I however find this a bit fustrating, and have tried everything I can think of to attempt to disable this.  However all the online tutorials I can find regarding disabling iMessage turns the feature off completly, I don't wish to do that. 
    I have attempted to completely delete, (including all existing all texts and call history), and then re-add the contact, but that does not work either, my iPhone still attempts to send messages to my sister as an iMessge. Any help, if any, would be appreciated. Thanks in advance.

    Your sister needs to disable iMessage on her iPhone if the iPhone is still available if she hasn't already done so.
    If she has, does she have iMessage enabled with the same Apple ID on another iOS device or on a Mac as was used to activate iMessage on her iPhone?

  • How to disable UAC for standard account in windows 8.1 single language OS

    Hi,
    How to Disable UAC in a standard account on windows 8.1 single language OS.
    application for mobile modem (TATA DOCOMO) always asks for administrator password, in windows 7 I used to just set UAC never Prompt in admin account and same setting would reflect in standard user account and then users where not prompted for password but in
    windows 8.1 single language edition I have disabled UAC in admin account but in standard account the setting for UAC was still in default (notify me when programs try to make changes to my computer), if I try to set never, the ok button is greyed out with
    message saying that you must be logged in as administrator.
    And Group policy editor, local security policy are not available in windows 8.1 single language.
    can any one give command to disable UAC  using CMD.
    OR
    set registry to not prompt for admin password.
    Thanks in  advance..........

    Hi Ed,
    But in control panel -> user accounts -> Change user account control settings
     I can set the settings to always notify
    and default notify when programs try to make changes to computer.
    But I can't set it to never prompt because only administrator as power to do that and if I set never prompt in  administrator account the settings in standard user remains in
    always notify.
    so please let me know, if there is any other way to over come the problem.
    Main problem is application from unknown source always prompt for admin password.
    I need to disable it from prompting for admin password to run applications in standard accounts.

  • How to disable the validity of a particular Role for 100 users, in a single

    Hi
    How to disable the validity of a particular Role
    which is assigned to 100 users. (disabling the role of change the validity of the role )
    at present am doing manually, by entering into each user and changing the validity of the role
    Thanks.

    > How to disable the validity of a particular Role for 100 users, in a single ...
    ... shot?
    Assign a reference user to the 100+ users and create events in the factory calendar which assigns and removes the role from the reference user only.
    The downside is that it is not scalable for many of the same concepts at the same time, because a dialog user can at one logon time only have one reference user assigned to them.
    Cheers,
    Julius

  • How to make disable/enable single item recovery effectively Immediately?

    for the following command , "it may take up to one hour to disable single item recovery",my question is how to make the disable/enable  single item recovery
    effectively Immediately by some command?
    SingleItemRecoveryEnabled $false/true
    http://technet.microsoft.com/en-us/library/ff678798(v=exchg.141).aspx
    Please click the Mark as Answer button if a post solves your problem!

    other options:
    Move the mailbox to another DB or if in a DAG, activate the DB on another server. ( the activating seems to work as far as I have seen at least).
    Twitter!: Please Note: My Posts are provided “AS IS” without warranty of any kind, either expressed or implied.

  • How to disable cache for a single query ?

    Hello BW Experts,
    I am running a Bex query. since the cache is not getting cleared it shows me wrong results. how to disable the cache settings for a single query ?
    are these settings different if you are running query using a web template..
    Please suggest.
    Thanks,
    BWer

    check also this post:
    Re: Query cache question

  • How to disable JTable Column Dragging (only single column)

    How could i disable a single column from being dragged in JTable?
    I need to fix the first column from being dragged in JTable and all other columns except the first can be dragged. how would i accomplish this task ?
    well, i know how to fix all column in jtable from being dragged using
    table.getTableHeader().setReorderingAllowed(false);But dont know how to fix only a single column. is there any method for doing this. or i have to implement any other logic?
    Please help me !
    Thanks

    The question is why do you have this requirement. I figure if the user wants to reorder the colum, let them, the table won't break.
    Maybe something like this would be acceptable:
    import javax.swing.*;
    import javax.swing.event.*;
    import javax.swing.table.*;
    public class FixedColumnScrollPane extends JScrollPane
        public FixedColumnScrollPane(JTable main, int fixedColumns)
            super( main );
            //  Use the table to create a new table sharing
            //  the DataModel and ListSelectionModel
            JTable fixed = new JTable( main.getModel() );
            fixed.setFocusable( false );
            fixed.setSelectionModel( main.getSelectionModel() );
            fixed.getTableHeader().setReorderingAllowed( false );
    //        fixed.getTableHeader().setResizingAllowed( false );
            fixed.putClientProperty("terminateEditOnFocusLost", Boolean.TRUE);
            main.putClientProperty("terminateEditOnFocusLost", Boolean.TRUE);
            //  Remove the fixed columns from the main table
            for (int i = 0; i < fixedColumns; i++)
                TableColumnModel columnModel = main.getColumnModel();
                columnModel.removeColumn( columnModel.getColumn( 0 ) );
            //  Remove the non-fixed columns from the fixed table
            while (fixed.getColumnCount() > fixedColumns)
                TableColumnModel columnModel = fixed.getColumnModel();
                columnModel.removeColumn( columnModel.getColumn( fixedColumns ) );
            //  Add the fixed table to the scroll pane
            fixed.setPreferredScrollableViewportSize(fixed.getPreferredSize());
            setRowHeaderView( fixed );
            setCorner(JScrollPane.UPPER_LEFT_CORNER, fixed.getTableHeader());
        public static void main(String[] args)
            //  Build your table normally
            JTable table = new JTable(10, 8);
            table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
            JScrollPane scrollPane= new FixedColumnScrollPane(table, 1 );
            JFrame frame = new JFrame("Table Fixed Column Demo");
            frame.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
            frame.getContentPane().add( scrollPane );
            frame.setSize(400, 300);
            frame.setVisible(true);
    }Or maybe you should be using a Row Header. A row header is like the column header of JTable. It remains fixed on the left side of the scroll pane. Search the forum for examples using "setrowheaderview".

  • Spark TabBar: How to disable single tabs?

    Hi,
    I wrote already a bug report about this issue, but no one responded.
    For an application I need to disable and enable tabs on the fly. So I built a TabBar with a ViewStack as a dataProvider and NavigatorContent as the single items. Then I tried disabling a NavigatorContent component so that the tab is disabled. But it is still enabled and can be selected. How can I disable a single tab? Do I have to create a custom solution or wait until the TabNavigator component is ported to Spark? (Maybe I should fall back to the halo component)
    Also the enabled property of the TabBar doesn't disable the tab content. So there seems to be no connection between the data and the TabBar.

    If you find this post looking for the answer, I posted two options here: http://forums.adobe.com/message/4153359#4153359
    =D

  • How to disable automatic login and to see other accounts?

    I bought MacBook Pro Retina with Mac OS X 10.8.2 in a shop, where there already was account "kiosk".
    I created new account, gave him Administrator priviliges.
    In the Preferences / Users & Groups I see kiosk account as "Managed", and my new account as "Admin".
    I set:
    System Preferences / Security & Privacy / General / Disable automatic login = Checked.
    System Preferences / Users & Groups / Login Options / Automatic login = Off.
    But still I have two issues:
    1) After start the laptop automatically logins into kiosk account, while I explicitly switched off this option
    2) Apart from kiosk account, the OS doesn't see any other accounts, for example my new account.
    For example, when I changed login shell for kiosk account into /usr/bin/false, I couldn't login at all. The OS said something like, there are no active accounts. So I had to set login shell back to /bin/bash using single-user mode.
    The questions are:
    How to disable automatic login into kiosk account?
    How to see a choice between kiosk account and my new account in the login dialog?
    How to delete kiosk account? Currently the delete option is disabled for kiosk in System Preferences / Users & Groups.
    So far after laptop start I automatically login into kiosk, then switch into my new account with entering a password, which is weird.
    Thanks in advance.

    It is your only option if you want to get rid of that other user account. It seems the system is Hard Set to boot to that account. How and why I have not Idea but the first thing you should of done was Restoring it to the Original OS, if it was not Mt Lion to begin with, in doing so getting rid of all other accounts and files from that other account.
    Time to Bit the Bullet and Erase the drive completely and reinstall the original shipping version of OS X on that system.
    Anton Mironenko wrote:
    Reinstalling the OS would be too extreme. I already have many programs installed, and I tuned a lot of params. Data migration is another pain.
    I hope, it is possible to solve this issue in another way.

Maybe you are looking for

  • Movie no longer available on Apple TV

    Hello, I purchased a movie on iTunes about a month ago and have watched it a few times on Apple TV.  It is now no longer showing on my Apple TV (but is showing on all other devices).  I've right clicked the movie in iTunes to make sure it's in the cl

  • Replication of tables in different schemas

    Hello, I have 2 schemas and would like to have tables (same structure), in the 2 different schemas, to be in sync. For eg: sample1.table_one sample2.table_one desc sample1.table_one is exactly the same as sample2.table_one I want both sample1.table_o

  • Suddenly all my contacts were replaced by my brothers. How do I get mine back?

    Suddenly all my contacts were replaced by my brother's. How do I get mine back?

  • HT2506 Permissions in Preview?

    I've been having problems viewing jpeg files in preview. It shows me the thumbnails but when I click to open it it says I do not have permission to view the file and suggests I go to "get info" and change the settings. I've done that with individual

  • Planing via MD01 only for one storage location

    Hi! I have the following setup: Plant p1 has storage locations sl1, sl2, sl3, ... sl9 In transaction mm43 (display retail material) I can see the following setup of the material: Dispositionsparameters: -MRP Type V2, ... and so on Behind Button MRP/F