JComboBox listener - which do i need?

Hi,
What listener do I need, so that I know when a new item is selected in the combo box? I only want to know when the item is selected. I know there is the itemListener but it fires an event for each item in the combo box until it gets the item that is being selected. I only want to be notified once.
thanks

          String[] model = new String[] { "one", "two", "three" };
          final JComboBox comBox = new JComboBox( model );
          comBox.addActionListener(new ActionListener() {
               public void actionPerformed(ActionEvent evt) {
                    System.out.println( comBox.getSelectedItem() );
          });

Similar Messages

  • IS there any app to listen FM radio which does not need internet.

    IS there any app to listen FM radio which does not need internet. Because my previous nokia phone had it and I can listen to local FM stations without connecting to internet.

    To think outside the box, you could get a headset with FM:
    Sony Ericsson MW600 Bluetooth Stereo Headset with FM Radio
    Sony Ericsson MH907ch Bluetooth Stereo Headset with FM Radio
    I use the first one with my Sony Ericsson phone, which although it does have a FM radio, doesn't work unless I have wired headphones plugged in.  And the streaming apps are choppy for me due to the weak 3G signal in my area.  (Constant rebuffering.)  So with these headsets, I have FM radio and can answer the phone without having to change earbuds and without having having to use up my cellphone's battery power to power the FM radio or the app.

  • JComboBox listener question

    Hi,
    I was wondering what kind of listener I would use to detect enter being pressed in a JComboBox.
    I tried an actionListener but this sends actionEvents at far too many times, I want to limit what I'm doing to only when the user presses enter in the JComboBox.
    It seems rather odd that a keyListener can't be used with a JComboBox, or at least according to the API specifications...
    All help is very appreciated!!

    The JComboBox itself just has the text field and then the down arrow, correct? Like if I am writing in that text field I am writing in the JComboBox? Basically all i need is a way to do something when the user presses 'enter', but not when all the other various things that trigger ordinary action events are fired. Using a keyListener to find out whether the key pressed was 'enter' seemed like the best way to do this, but if key events aren't even getting sent when the focus is in the text portion of the JComboBox that may not be the case. If there's anyway i can explain the problem better I'd be happy to do so.
    Thanks

  • Listener or watchdog is needed

    Hi,
    I need to implement a listener which can monitor a message queue, so when new message comes into the queue, it will fire a signal to invoke other application/thread.
    Currently, I have to do a polling at specified interval. But the polling is somewhat expensible, say need database connection, enquiry and the interval is 5 seconds.
    Thanks in advance.
    Harv

    if you are really using a queing system, like MQSeries or JMS variants, this is done for you already. But it looks like you are using a database table as a queue and polling the table for latest entries, you can poll using a thread is not that bad. But if you have the latest Oracle and others that have java build in, you should be able to use triggers and have java stored procedures notify 'observers' using sockets or RMI (I only have oracle 8i and that is 1.1.8 I believe). Ideally, I will like to try some JINI etc and cannot wait till I get Oracle 9i, assuming that has 1.2!

  • I am trying to use a website on my ipad which says it needs Adobe Flashplayer but I can't download Adobe when I click on it

    I am trying to use a website on my ipad which says it needs Adobe Flashplayer but I can't download Adobe when I click on it

    Adobe has not made a version of Flash for the iPad.
    Kappy explains why. https://discussions.apple.com/message/19446567#19446567
    5 Flash Player Alternatives http://www.techshout.com/features/2011/01/flash-player-for-ipad-apps/
    Top 4 browsers supports flash player on iPad and iPhone
    http://mashtips.com/flash-player-ios/
     Cheers, Tom

  • In R12 which file we need to modify as there is no jserv.properties

    In 11i we used to set some proxy settings like proxy host, proxy port etc... where as in R12 there will be no jserv.properties.. so where and which file we need to set these settings.
    can you plz guide me

    Hi,
    in R12 all the JVM parameters can be changed in $ORA_CONFIG_HOME/10.1.3/opmn/conf/opmn.xml
    But if you are talking about proxy and the rest then please check in $INST_TOP/ora/10.1.3/j2ee/oafm/config/oc4j.properties
    Thanks
    Edited by: EBSDBA on Dec 18, 2012 12:30 PM

  • Before i buy the complete creative cloud, how many computers can i install it on with the one subscription? i have a macbook pro laptop and a iMac desktop, which i both need it on.

    before i buy the complete creative cloud, how many computers can i install it on with the one subscription? i have a macbook pro laptop and a iMac desktop, which i both need it on.

    Creative Cloud Help | Creative Cloud / Common Questions
    "Can I use the software I download from Creative Cloud on more than one machine?
    Yes. Creative Cloud desktop applications can be downloaded and installed on multiple computers, regardless of operating system. However, activation is limited to two machines per individual associated with the membership. See the terms of use for more information. Learn how to deactivate a Creative Cloud license on a machine."

  • HT1338 Hi everybody..i have an enigmatic problem since i bought MacBook Air..i can't watch youtube videos and i did install the latest adobe flash player BUT when i start to install it the system keeps asking me to enter a password ? which password i need

    Hi everybody..i have an enigmatic problem since i bought MacBook Air..i can't watch youtube videos and i did install the latest adobe flash player BUT when i start to install it the system keeps asking me to enter a password ? which password i need ??????

    Your admin account password.

  • In which situation I need to active objects after transport

    Hi Experts,
        I'm wondering in which situation I need to active object after transport?  In some cases, I have to active transformation, DTP, infoobject, multiprovider....  Does any one make a conclusion of that?
        thanks in advance.
    Eric

    Sometimes, because of impact of a transport some other objects will be deactivated, then we need to manuaaly activate the objects after transport.
    Also, sometimes transport after import process could not be able to activate the objects, then also we have to activate them manually.
    Or suppose, you have moved and infoobject, due to which some other objects become inactive (where ever infoobjects is being used), then we have to activate them manually, if you dont want to transport them.

  • In which case we need a class with all methods defined as abstract ?

    In which case we need : A class with all methods defined as abstract (or should we go for Interface always in this case)

    The concept of interface and abstract class overlaps sometime, but we can have the following thumb rule to use them for our specific need:
    1) Interface: This should be use for code structuring. They standardize your application by providing a specific contract within and outside. If you think abstract class also provide structure, then reconsider as it limits the structure re-usability when there are many super-classes to inherit from. Java allow multiple inheritance by interface and not by Abstract class.
    2) Abstract Class: This should be use for code-reusability. Interface doesn't have any code so can't be used for code-reusability.
    Actually we can use both to provide the best.Taking a refernce to J2EE framework, the "Servlet" is an interface. It laids down the contract/structure for any code to be a servlet.
    But the "GenericServlet" class is an abstract class which provides implementation of some of the methods defined in the "Servlet" interface and leave some method abstract.
    Thus we see that the "Servlet" interface standardise the structure and the "GenericServlet" abstract class gives code re-usability.
    Original Question:
    In which case we need a class with all methods defined as abstract ?To this question, as all methods are abstarct we don't have option for code-reusability. so why not add standard structure concept to your application. So if there is not any restriction on making the field variable(if any) as final, we should go with the interface concept.

  • Need help on which adobe download needed to view content in pdf file

    I needhelp deciding on which adobe download need to view pdf file

    Go to the download page here ---> Adobe Reader Install for all versions
    Be sure that it shows your OS to get the proper download. Also, you want to deselect the "Optional" offer that is selected by default unless you want it of course.

  • Which scenario we need to choose ?

    Hi experts,
    For inventory which scenario we need to implement i.e
    1.Inventory management with non-cumulative key figures or
    2.Inventory management with SnapShots.
    Please guide me what is the difference and which is the best.
    Full points will be assigned.
    Thanks & Regards,
    V N.

    Hi,
    Please go thru these links;
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/93ed1695-0501-0010-b7a9-d4cc4ef26d31
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f83be790-0201-0010-4fb0-98bd7c01e328
    Thanks..
    Shambhu

  • Which cables are needed to connect macbook 13" to HDTV

    Hi, was wondering which cables i needed to connect my 13" aluminium macbook to a samsung HDTV. There's so many on the apple store, not entirely sure what I need. Any help would be appreciated.
    thanks

    Can you clarify whether you're using a MacBook Pro or a PowerBook?  Your post is ambiguous.  For good measure please tell us when it was purchased new.

  • I have an 2007 mac book pro that does not have a place for HDMI cable.  Can you please tell which converter I need?

    I have an 2007 mac book pro that does not have a place for HDMI cable.  Can you please tell which converter I need?

    You will need something such as this:
    http://www.amazon.com/A-Sonic-HDMI-HD15-Male-Cable/dp/B001OLCHJ6
    Ciao.
    Note that this will only transmit video.  If you need sound, the audio output port will have to be tapped.
    Message was edited by: OGELTHORPE

  • HT1766 during restoring from backup, itunes is asking for password, which password i need to enter, please help

    during restoring from backup, itunes is asking for password, which password i need to enter, please help

    The passcode you established when you elected to encrypt your iPhone backup.

Maybe you are looking for

  • How can i delete stock photos from my Mac that are on my iPhone?

    When I first synced my iPhone 4S to my iTunes on my macbook pro, I got a bunch of stock photos and icons used on my computers. I cannot delete them on my iPhone like you would delete a normal photo; the option to delete the photos is disabled, The pi

  • End-of-file reached (-39) error

    I currently use QT 7.0.2. Frequently when I join multi-part AVI. videos together using "Split and Concat" software and try to play them I get the error message "end-of-file reached (-39)" and nothing happens. What does this message mean and how can I

  • Can this MacMini (2007) handle streaming HD video?

    I'm looking at buying an used MacMini (2007) to act as a dedicated media server. I want to make sure the one I'm looking at can properly handle HD video streaming. It's a 2007 model with the 1.83 ghz Core 2 Duo processor and 2gb ram upgrade. I'm nerv

  • How do I get a profile / .per file from a EPMA application this is for HFM

    I want to copy an EPMA application into another environment but outside of EPMA. I can get the metadata, Security and Rules Extracts. How do i get the .per periods file to set up the classic application.

  • SecurityDomain/Settings bug?

    Hello all! I've encountered a strange situation, when googling does not help at all. :/ So, I have two swfs, app.swf and p2p.swf. The app.swf is on the domain-app.com. The p2p.swf is on the domain-p2p.com. The app.swf loads the second one using the f