Listener for JCombobox,right???

ivjJCBSepTask.getModel().addListDataListener
newListDataListener()
     public void contentsChanged(ListDataEvent e)
     public void intervalRemoved(ListDataEvent e)
     public void intervalAdded(ListDataEvent e)
I wrote this in my JCombobox. The Combobox should react when a other entrie is selected.
Another problem: The Combobox will be filled from database. How can i make a comparison between the contents who is selected and a constant maybe string ?
for example: if( comboboxContents == "KOM") ... could that function?

Class ComboValue was ment to be "a container" for information you need to include in your combobox. getConstant method should have been included in that class. And when you query from db you instantiate objects based on ComboValue and add those into your JComboBox
combo.addItem( new ComboValue(index, constant, desc) );  After that you have to cast objects in combo to ComboValue and use getConstat method.
But as I said this was just a suggestion and Im sure there are several better ways to do this.

Similar Messages

  • Use 1 listener for multiple database in a server

    hi guys,
    just want to check whether this is the right way to configure my Listener.ORA . I am using 1 listener.ora to listen for incoming request connection from remote client. There are multiple databases installed in a server.
    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = ora03)(PORT = 1521))
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (GLOBAL_DBNAME = O11R2)
    (ORACLE_HOME = /oracle/app/oracle/product/11.2.0/db_1)
    (SID_NAME = O11R2)
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (GLOBAL_DBNAME = O10G)
    (ORACLE_HOME = /oracle/app/oracle/product/10.2.0/db_1)
    (SID_NAME = O10G)
    )sorry i am reading about it so did not install another database to test out. Just thinking in the line that it mention that the list of SID is refering to the multiple database that is installed in a server and i am using 1 listener.
    Please further advice.

    Shivananda Rao wrote:
    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = ora03)(PORT = 1521))
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (GLOBAL_DBNAME = O11R2)
    (ORACLE_HOME = /oracle/app/oracle/product/11.2.0/db_1)
    (SID_NAME = O11R2)
    (SID_DESC =
    (GLOBAL_DBNAME = O10G)
    (ORACLE_HOME = /oracle/app/oracle/product/10.2.0/db_1)
    (SID_NAME = O10G)
    )Please use as above. You can have one listener for multiple databases.right right so it the pattern goes like this:
    SID_LIST_LISTENER =
         (SID_LIST =
              (SID_DESC =
              (GLOBAL_DBNAME = AAAA)
              (ORACLE_HOME = /oracle/app/oracle/product/11.2.0/db_1)
              (SID_NAME = AAAA)
              (SID_DESC =
              (GLOBAL_DBNAME = BBBB)
              (ORACLE_HOME = /oracle/app/oracle/product/10.2.0/db_1)
              (SID_NAME = BBBB)
         )thanks !

  • Listen for Full Screen mode

    I have a FLVPlayer with a skin on stage and I want to listen for the player going into full screen mode when the skin's fullscreen button is clicked. And I want to listen for it going back to normal but I think that is easy enough, I just listen for the escape key, I think. How do I do that?

    not the browser
    im using a stand alone swf player
    Date: Mon, 9 Apr 2012 09:05:51 -0600
    From: [email protected]
    To: [email protected]
    Subject: Listen for Full Screen mode
        Re: Listen for Full Screen mode
        created by kglad in Action Script 3 - View the full discussion
    you should not try and control a user's browser window.  but, if you insist, you'll need to use javascript.
         Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/4322220#4322220
         To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/4322220#4322220. In the Actions box on the right, click the Stop Email Notifications link.
         Start a new discussion in Action Script 3 by email or at Adobe Forums
      For more information about maintaining your forum email notifications please go to http://forums.adobe.com/message/2936746#2936746.

  • Same listener for 2 databases

    Hi,
    i installed oracle EM GRID CONSOLE on my linux system with database called "emrep"
    and then i installed another database "orcl"
    now when i log into grid console and i view my targets i see only one listener
    called "LISTENER0_oracle.ebenezer.com"
    and when i see the serviced databases for this listener, i see both the databases under this listener.
    does this mean that one listener in one system is all required to service how many databases as possible.
    or do we need one unique listener for each database. if then how can i create unique listeners.
    Can someone help me please.
    Thanks,
    Philip.

    Philip,
    I will try to answer at your questions.
    so from what u r saying is, if i have 3 databases in
    my linux system under different oracle_homes.
    all i need is one listener.ora file and have all 3
    databases start under this one file. and i can delete
    the other 2 listener.ora files, because i dont need
    them at all.For this, my answer is a question : why have different ORACLE_HOME if databases are in same version ? This is Ok when database are in different oracle version.
    1. if i want to know how many listeners are in setup...You can see it with lsnrctl command, after set well ORACLE_HOME (for linux, export ...) :
    set ORACLE_HOME=e:\oracle\ora92
    E:\oracle\ora92\bin>lsnrctl status
    LSNRCTL for 32-bit Windows: Version 9.2.0.7.0 - Production on 16-NOV-2005 22:44:
    41
    Copyright (c) 1991, 2002, Oracle Corporation.  All rights reserved.
    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=gocha)(PORT=1522)))
    STATUS of the LISTENER
    Alias                     LISTENER
    Version                   TNSLSNR for 32-bit Windows: Version 9.2.0.7.0 - Produc
    tion
    Start Date                16-NOV-2005 22:44:04
    Uptime                    0 days 0 hr. 0 min. 40 sec
    Trace Level               off
    Security                  OFF
    SNMP                      OFF
    Listener Parameter File   E:\oracle\ora92\network\admin\listener.ora
    Listener Log File         E:\oracle\ora92\network\log\listener.log
    Listening Endpoints Summary...
      (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=gocha)(PORT=1522)))
    Services Summary...
    Service "demo9i" has 1 instance(s).
      Instance "demo9i", status UNKNOWN, has 1 handler(s) for this service...
    The command completed successfully
    E:\oracle\ora92\bin>>
    2. when i create a listener using net configuartion...For my part, manually seems the only one solution in your case.
    >
    3.when i have 3 databases and i when i login through...When you are logon to database, you can see what db with
    select * from v$instance;But to connect to an other db, you need first set as well your ORACLE_SID
    export ORACLE_SID=emrep
    sqlplus '/ as sysdba'>
    4. when i create a database by default the listener...Default name is well in most of case, but you can give a name to know the environment (like LISTENER_DEV, LISTENER_PROD...)
    Perhaps you need to read some Oracle docs. You can find here http://www.oracle.com/pls/db102/portal.portal_db?selected=1 too many docs, I can advise you to read 2 Day DBA to start as well your dba life.
    Good luck in your job,
    Nicolas.

  • Listen for events from an embedded Swf

    Hi there,
    I have spend so long searching for an answer on the web but can not find any that works, please help!
    I'm not even sure if this is possible but if anyone can guide me in the right direction I would most appreciate it!
    Basically what I would like to do is to load a swf in to my flex application - contrary to my post title it doesnt even have to be embedded - when the loaded swf finishes playing it's animation I want for it to dispatch an event and for flex to listen for that event and trigger a function when the event is captured.
    The animation is made in Flash CS3. I have not used any classes, rather on the last frame I set up an action to dispatch an event like this:
    dispatchEvent(new Event("finishedPlaying"));
    In my Flex Application I load my swf using swfLoader and I add an event listener to it like so:
    mySwfLoader.addEventListener("finishedPlaying", test);
    and my function is like this:
    private function test():void
         trace("it worked!");
    This is not working at all and I'm sure I am missing something but I cant seem to find any straightforward answer on the internet!
    Is it at all possible for a swf made in flash to communicate with flex??
    Since they are both written in AS3, I figured it would be easy but alas!
    If anyone can help me I would most appreciate it, thank you in advance!!
    By the way I have also tried:
    mySwfLoader.content.addEventListener("finishedPlaying", test);
    but no luck....

    You have to wait for the swf to complete loading before adding the event listener.
    When are you adding the event listener?
    mySwfLoader.addEventListener("finishedPlaying", test);
    Have a look at the SWFLoader complete event:
    http://livedocs.adobe.com/flex/3/langref/mx/controls/SWFLoader.html#event:complete

  • Dispatching & listening for custom events from custom component [Flex 4.1]

    I'm giving this a try for the first time and I'm not sure I have the recipe correct!
    I have a custom component - it contains a data grid where I want to double click a row and dispatch an event that a row has been chosen.
    I created a custom event
    package oss
        import flash.events.Event;
        public class PersonChosenEvent extends Event
            public function PersonChosenEvent(type:String, bubbles:Boolean=false, cancelable:Boolean=false)
                super(type, bubbles, cancelable);
            // Define static constant.
            public static const PERSON_CHOSEN:String = "personChosen";
            // Define a public variable to hold the state of the enable property.
            public var isEnabled:Boolean;
            // Override the inherited clone() method.
            override public function clone():Event {
                return new PersonChosenEvent(type);
    Then I try to dispatch the event within the component when the datagrid is doubleclicked:
    import oss.PersonChosenEvent
    dispatchEvent(new PersonChosenEvent(PersonChosenEvent.PERSON_CHOSEN, true, false));
    And in the parent application containing the component I do on creationComplete
    addEventListener(PersonChosenEvent.PERSON_CHOSEN,addPersonToList);
    The event does not seem to fire though. And if I try to evaluate the "new PersonChosenEvent(..." code it tells me "no such variable".
    What am I doing wrong?
    (It was so easy in VisualAge for Java, what have we done in the last 10 years?? )
    Martin

    I've done this kind of thing routinely, when I want to add information to the event.  I never code the "clone" method at all.
    Be sure that you are listening to the event on a parent of the dispatching component.
    You can also have the dispatching component listen for the event too, and use trace() to get a debug message.
    I doubt if it has anything to to with "bubbles" since the default is true.
    Sample code
    In a child (BorderContainer)
    dispatchEvent(new ActivationEvent(ActivationEvent.CREATION_COMPLETE,null,window));
    In the container parent (BorderContainer)
    activation.addEventListener(ActivationEvent.CREATION_COMPLETE,activationEvent);
    package components.events
        import components.containers.SemanticWindow;
        import components.triples.SemanticActivation;
        import flash.events.Event;
        public class ActivationEvent extends Event
            public static const LOADED:String = "ActivationEvent: loaded";
            public static const CREATION_COMPLETE:String = "ActivationEvent: creation complete";
            public static const RELOADED:String = "ActivationEvent: reloaded";
            public static const LEFT_SIDE:String = "ActivationEvent: left side";
            public static const RIGHT_SIDE:String = "ActivationEvent: right side";
            private var _activation:SemanticActivation;
            private var _window:SemanticWindow;
            public function ActivationEvent(type:String, activation:SemanticActivation, window:SemanticWindow)
                super(type);
                _activation = activation;
                _window = window
            public function get activation():SemanticActivation {
                return _activation;
            public function get window():SemanticWindow{
                return _window;

  • Listening for a FMS messge with AS3

    I need to get messages from Flash Media Server. I've had a
    hard time finding any good books or even info on how to setup a
    NetConnection to listen for a Flash Media Server message and to
    convert the binary data to info I can use. Can someone please point
    me in the right direction???
    Thanks!

    Relax. I was providing a reference to the other thread for context since they seem to be the same discussion, and it wastes time for people to be answering questions to two different threads on the (more or less) same subject without knowing the whole story.
    Trying to detect "something" coming into the ethernet port is too vague of a question. Any computer connected to a network will always have something coming into the ethernet port. I doubt very much whether you want to be analyzing every single packet that comes in to determine that you've had a file uploaded. Unless the other computer can send you a message I would suggest simply monitoring the directory to look for changes in the list of files like I suggested. In Windows there's an API function that you can hook into that will provide notification of a file system change. There may be something like that for a Mac, but I ain't got a Mac so I can't say what that is.

  • PopUpAnchor listening for Scrolling

    I have a PopUpAnchor, and when I scroll I need the position to update. So I'm calling the updatePopUpTransform() method.
    When you use the scrollbar everything is good. However, when you scroll using the wheel, the updatePopUpTransform seems to be off by about 1 scroll. So if I need my PopUpAnchor to be right at the bottom of something on screen, now there is a gap between them. This doesn't happen when you scroll using the scrollbar though. Anyone have any ideas why these 2 are working differently?
    Here's some of my code:
      this.grid.addEventListener( ScrollEvent.SCROLL, myCallBack );
      this.grid.addEventListener( MouseEvent.MOUSE_WHEEL, myCallBack);
    And in my call back:
    this.myPopup.updatePopUpTransform();
    I've even tried having myCallBack just called from a single Event.SCROLL event, and that doesn't work either. Same results.
    Thanks for the help!

    aneuryzma wrote:
    hi,
    I have implemented a client opening a HttpURLConnection to send an image to a servlet.
    I would like to know how should be the code on the server, listening for httpURLconnections... can you give me some tip ?
    Here is the client code... What I need is the server code... I want to save the file to hard disk, when a post is performed.And you want to use a servlet to do that? Then your google keywords are "file upload servlet". I recommend the links which recommend using Apache software in your servlet.

  • How to listen for key press when air app does not have focus

    Hi,
    I am developing a application in air and part of the functionality I need is the ability for the app to listen for when a specific key is pressed, even when the air app does not have focus.
    Is there support for this for windows or mac? If not, how might this be accomplished? ANE?    

    Ok Mr. Smartass...Ok
    I'm building a browser that is always open, and when
    a user presses Ctrl+F1 (notice, just those two keys,
    I don't care what else they press...) the browser
    will open up. That way, you don't have to wait for it
    to load all the time.You have two ideas here. One is having a universal key map that always gets ctrl-f1 sent to your app. The other is a program that is constantly running so that you don't have to wait for it to open up. The former is not possible (and this is a good thing) As warneria and I have been saying, it is bad design for an app to try to force an OS to implement this kind of feature.
    If you're not going to help please don't post at all;
    it's a waste of time for both you, me, and anyone
    else who may need help on the same subject. Why wouldBelieve it or not, I am helping you.
    See
    http://www.google.com/search?hl=en&lr=&q=programming+code+side+effects
    and
    http://www.faqs.org/docs/artu/ch04s02.html
    "Doug McIlroy's advice to �Do one thing well� is usually interpreted as being about simplicity. But it's also, implicitly and at least as importantly, about orthogonality."
    anyone in their right mind who's trying to steal
    people's passwords come out and say, "I'm not trying
    to steal people's passwords!"wait, your question is why would someone trying to steal passwords say I'm not trying to steal passwords? I think duplicitous people in their right minds might try to trick you that way.
    Beyond that, even if you're not a malicious hacker - and I am sure you are not - if someone posts a solution to your problem, malicious coders then will have learned how to do it. If you think you're programming or using these forums in a bubble, you are not.

  • How to set mouse listener for title bar of JFrame ?

    Hi, all
    How to we can set mouse listener for title bar of JFrame ?
    Please help

    Again, why did you not state this in your original
    question? Do we have to ask you every time what your
    actual requirement is?
    As I said in your last posting, if you don't give us
    the reuqirement in you question we can't help you.
    Sometimes your solution may be on the right track
    sometimes it isn't. We waste time guessing what your
    are trying to do if you don't give us the
    requirement.
    I gave you the answer in your other posting on this
    topic. The AWTEventListener can listen to events
    other than MouseEvents.
    The Swing tutorial has a list of most of the events.
    Pick the events you want to listen for:
    http://java.sun.com/docs/books/tutorial/uiswing/events
    /handling.htmlthe first, i am sory because my requirement not clear so that it wasted everybody time.
    The second, thank for your answer
    The third, AWTEvenListener do not support listener event on title bar
    but ComponentListener can know when we can change frame position.
    please see below that ComponentListener can handle action:
    public void componentHidden(ComponentEvent e) {
            displayMessage(e.getComponent().getClass().getName() + " --- Hidden");
        public void componentMoved(ComponentEvent e) {
            displayMessage(e.getComponent().getClass().getName() + " --- Moved");
        public void componentResized(ComponentEvent e) {
            displayMessage(e.getComponent().getClass().getName() + " --- Resized ");           
        public void componentShown(ComponentEvent e) {
            displayMessage(e.getComponent().getClass().getName() + " --- Shown");
        }Thanks for all supported your knowledge, you are great !

  • Stopping key listener for component?

    I have a listener for the
    arrow key strokes. When I select my clip the arrows work fine. However, there is also a slider on the stage. If I touch the slider the left and right keys
    now adjust the slider, this is not desired. How to I prevent the slider from using the keyboard input?
    Thanks

    I didn't use the prevent default, couldn't get it to work. However on my up handler of the slider I just set the focus back to the stage and it see
    med to be a good workaround.
    Thanks!

  • Listener for Message gateway

    Hi,
    I am trying to get the Message gateway for MQ series setup in Windows XP. I have followed the documentation but just cant seem to get the right setup in my listener.ora, tnsnames.ora and sqlnet.ora.
    If anyone has this working and is willing to share their config with me it would be much appreciated.
    Thanks
    David

    A listener for an image, as in ActionListener. So basically you're saying there is no way to have something within a cell have an ActionListener - it would have to be cell itself that listens?
    thanks

  • Listen for menu item

    Is it possible to trigger something when a menu item it selected? I DON'T mean to create a menu item and the assign a script to it, but for example listen for a user clicking Search from the Help menu in Safari?
    If so, could someone point me in the right direction please.
    Thanks.

    +Short answer...+
    No. AppleScript does not work this way.

  • How to configure multiple listeners to listen for the same instance.

    Hello everyone,
    I am running oracle database 11g and I want information regarding how to configure multiple listeners to listen for the same database instance. Actually I know how to configure more than one listener but the main thing that I am confused about is when we create listener.ora file, do we have to statically register the database instance with both the listeners or the instance will register itself with both the listeners.
    According to my knowledge the instance will register with the listener specified by LOCAL_LISTENER parameter and we cannot have more than one value for this parameter.
    Please only give detailed answers with example as I am tired of simple answers with details that I already know.

    Hello,
    Yes, it can make sense to have several listener for one Oracle instance. For instance you may have one listener for the applications another listener for DBA administration tasks as well as one listener dedicated to dataguard broker. It is not possible to have several listeners listening on the same IP and Port.
    By default the database try to automatically register to a listener on port 1521. To instruct the instance to register to a specifc list of listeners you can add in the init.ora the local_listener parameter with an alias definition:
    i.e
    local_listener=MY_SET_OFF_LISTENERS
    in your tnsname.ora add an entry called:
    MY_SET_OFF_LISTENERS_LOCAL= (ADDRESS_LIST=
    (ADRESS=(PROTOCOL=TCP)(HOST=myhostname)(PORT=1530))
    (ADRESS=(PROTOCOL=TCP)(HOST=myhostname)(PORT=1531))
    (ADRESS=(PROTOCOL=TCP)(HOST=myhostname)(PORT=1532))
    In this sample your instance will register to three listeners listening on respectively port 1530, 1531 and 1532
    If you want your clients can be balanced over the 3 listeners

  • One Listener for multiple things?

    Is is OK to use on listener for multiple events on the same object?
    I have this for a FLV component and it seems to work. Is that legit?
    var listenerObject:Object = new Object();
    listenerObject.complete = function(eventObject:Object):Void {
        trace("End of this video!!!!");
    myVideo.addEventListener("complete", listenerObject);
    listenerObject.stateChange = function(eventObject:Object):Void {
        trace("stateChange just occurd!!!");
    myVideo.addEventListener("stateChange", listenerObject);
    Thanks a lot for any info!!!

    Yup no problem. However I would group my listener object properties close together.
    listenerObject.complete=function(e:Event){
    // blah blah
    listenObject.progress=function(e:Event){
    // blah blah blah
    And so on. If they end up separated you most likely will forget over the course of time and then when you come back you might delete the object after you use it for one event and forget that it has others.

Maybe you are looking for

  • The Snippets Plug-In does not work anymore

    Hey there, i used this plug-in, where i get it from here. The snippets helped me to insert basic source code, like setter/getter-functions (i know that these function are implemented in flash builder ) and other things like whole switch-statements or

  • [Solved]Can`t create internet connection

    I`ve installed arch linux on my lenovo y550, but, because I was too sleepy to think yesterday so I didn`t configure the /etc/rc.conf and /etc/resolv.conf file (I installed from CD). All in all i`ve got neither wired nor wireless connection to the int

  • How to create success factors csv directory path in sap ?

    Dear Gurus, I want to make a directory path for success factors csv exporting in sap. what should i do ? where can i start ? where can i make this directory path like "SFactors" , "E:\SFactors" ? Best Regards

  • I phone wi fi button won't switch on

    I phone 4 wi fi button won't slide across to switch wi fi on

  • Connection through tomcat

    How can i make database connection using tomcat configuration.