Listeners Problem

Dear All
i type netmgr and ORACLE NET MANAGER OPENS there i click on (plus)+ sign of Listeners and it gives following error ..
[oracle@sys202 ~]$ netmgr
Exception occurred during event dispatching:
java.lang.IllegalArgumentException: illegal LWChoice item position: 2
at oracle.ewt.lwAWT.LWDataSourceChoice.select(Unknown Source)
at oracle.ewt.lwAWT.LWChoice.select(Unknown Source)
at oracle.net.mgr.profile.NetAddr.displayAddrPanel(NetAddr.java)
at oracle.net.mgr.profile.NetAddr.display(NetAddr.java)
at oracle.net.mgr.profile.NetAddr.<init>(NetAddr.java)
at oracle.net.mgr.listener.ListenerListeningLocations$EndpointPanel.<init>(ListenerListeningLocations.java)
at oracle.net.mgr.listener.ListenerListeningLocations.newAddr(ListenerListeningLocations.java)
at oracle.net.mgr.listener.ListenerListeningLocations.parseAList(ListenerListeningLocations.java)
at oracle.net.mgr.listener.ListenerListeningLocations.parseDList(ListenerListeningLocations.java)
at oracle.net.mgr.listener.ListenerListeningLocations.get(ListenerListeningLocations.java)
at oracle.net.mgr.listener.ListenerConfigure.<init>(ListenerConfigure.java)
at oracle.net.mgr.listener.ListenerComponent.loadListener(ListenerComponent.java)
at oracle.net.mgr.listener.ListenerComponent.loadData(ListenerComponent.java)
at oracle.net.mgr.listener.ListenerComponent$ListenerCompDataSource.internal_refreshData(ListenerComponent.java)
at oracle.sysman.emSDK.client.dataComponent.dataDrivenTree.TreeDataSource.populateData(TreeDataSource.java:1039)
at oracle.sysman.emSDK.client.dataComponent.dataDrivenTree.TreeDataSource._initData(TreeDataSource.java:1083)
at oracle.sysman.emSDK.client.dataComponent.dataDrivenTree.TreeDataSource.initData(TreeDataSource.java:1056)
at oracle.sysman.emSDK.client.dataComponent.dataDrivenTree.TreeParentNode.setExpanded(TreeParentNode.java:284)
at oracle.sysman.emSDK.client.dataComponent.dataDrivenTree.TreeParentNode.setExpanded(TreeParentNode.java:242)
at oracle.ewt.dTree.DTreeButtonDecoration.processMouseEvent(Unknown Source)
at oracle.ewt.dTree.DTreeStackingDecoration.processMouseEvent(Unknown Source)
at oracle.ewt.dTree.DTree.processMouseEvent(Unknown Source)
at oracle.sysman.emSDK.client.dataComponent.dataDrivenTree.DataDrivenTree.processMouseEvent(DataDrivenTree.java:1207)
at java.awt.Component.processEvent(Component.java:2203)
at java.awt.Container.processEvent(Container.java:901)
at oracle.ewt.lwAWT.LWComponent.processEventImpl(Unknown Source)
at oracle.ewt.dTree.DTree.processEventImpl(Unknown Source)
at oracle.ewt.lwAWT.LWComponent.redispatchEvent(Unknown Source)
at oracle.ewt.lwAWT.LWComponent.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Component.java:1812)
at java.awt.Container.dispatchEventImpl(Container.java:946)
at java.awt.Component.dispatchEvent(Component.java:1744)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:1841)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:1625)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:1531)
at java.awt.Container.dispatchEventImpl(Container.java:933)
at java.awt.Component.dispatchEvent(Component.java:1744)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
In addition Lintner is also giving error which is below
[oracle@sys202 ~]$ lsnrctl start
LSNRCTL for Linux: Version 9.2.0.4.0 - Production on 23-DEC-2008 11:35:42
Copyright (c) 1991, 2002, Oracle Corporation. All rights reserved.
Starting /u02/app/oracle/product/9.2.0/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 9.2.0.4.0 - Production
System parameter file is /u02/app/oracle/product/9.2.0/network/admin/listener.ora
Log messages written to /u02/app/oracle/product/9.2.0/network/log/listener.log
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=sys202.netsolpk.com)(PORT=1521)))
TNS-01155: Incorrectly specified SID_LIST_LISTENER parameter in LISTENER.ORA
NL-00303: syntax error in NV string
Listener failed to start. See the error message(s) above...
Thanks
Malik Adeel Imtiaz
Netsol technologies

I have copied as Steek said like this is this the right way.
LISTENER =
*(DESCRIPTION_LIST =*
*(DESCRIPTION =*
*(ADDRESS = (PROTOCOL = TCP)(HOST = sys202.netsolpk.com)(PORT = 1521))*
SID_LIST_LISTENER =
*(SID_LIST =*
*(SID_DESC =*
*(SID_NAME = PLSExtProc)*
*(ORACLE_HOME = /u02/app/oracle/product/9.2.0)*
*(PROGRAM = extproc)*
*(SID_DESC =*
*(GLOBAL_DBNAME = TLT)*
*(ORACLE_HOME = /u02/app/oracle/product/9.2.0)*
*(SID_NAME = TLT)*
*(SID_DESC =*
*(GLOBAL_DBNAME = FMS)*
*(ORACLE_HOME = /u02/app/oracle/product/9.2.0)*
*(SID_NAME = FMS)*
*(SID_DESC =*
*(GLOBAL_DBNAME = wfstlt)*
*(ORACLE_HOME = /u02/app/oracle/product/9.2.0)*
*(SID_NAME = wfstlt)*
*(SID_DESC =*
*(GLOBAL_DBNAME = wfstmfcn)*
*(ORACLE_HOME = /u02/app/oracle/product/9.2.0)*
*(SID_NAME = wfstmfcn)*
*(SID_DESC =*
*(GLOBAL_DBNAME = sqachina)*
*(ORACLE_HOME = /u02/app/oracle/product/9.2.0)*
*(SID_NAME = sqachina)*
*(SID_DESC =*
*(GLOBAL_DBNAME = sqathai)*
*(ORACLE_HOME = /u02/app/oracle/product/9.2.0)*
*(SID_NAME = sqathai)*
*(DESCRIPTION_LIST =*
*(DESCRIPTION =*
*(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))*
*(DESCRIPTION =*
*(ADDRESS = (PROTOCOL = TCP)(HOST = sys202.netsolpk.com)(PORT = 1521))*
SID_LIST_LISTENER =
*(SID_LIST =*
*(SID_DESC =*
*(SID_NAME = PLSExtProc)*
*(ORACLE_HOME = /u02/app/oracle/product/9.2.0)*
*(PROGRAM = extproc)*
*(SID_DESC =*
*(GLOBAL_DBNAME = TLT.netsolpk.com)*
*(ORACLE_HOME = /u02/app/oracle/product/9.2.0)*
*(SID_NAME = TLT)*
*(SID_DESC =*
*(GLOBAL_DBNAME = FMS.netsolpk.com)*
*(ORACLE_HOME = /u02/app/oracle/product/9.2.0)*
*(SID_NAME = FMS)*
*)*

Similar Messages

  • Event listeners problem

    I have a problem with the firing of event listeners.  I have 4 functions (see below). Function f1 is triggered when button1 is clicked and function f3 is triggered when button3 is clicked.  Then f1 calls getFileOperation (a webservice operation) and should call function f2 whereas function f3 should call function f4.
    function f1 (event:MouseEvent):void
    trace("f1 triggered");
    getFileOperation.addEventListener(ResultEvent.RESULT, f2);
    function f2 (ev:ResultEvent):void {
    trace("f2 triggered");
    function f3 (event:MouseEvent):void
    trace("f3 triggered");
    getFileOperation.addEventListener(ResultEvent.RESULT, f4);
    function f4(e:ResultEvent):void {
    trace("f4 triggered");
    However the output being given when I press button1 followed by button2 is:
    f1 triggered
    f2 triggered
    f3 triggered
    f2 triggered   ///repeated!!!
    f4 triggered
    Similarly the output being given when I press button2 followed by button1 is:
    f3 triggered
    f4 triggered
    f1 triggered
    f4 triggered  ///repeated!!!
    f2 triggered
    Why is f2 fired again in the first case and f4 in the second case? How can I go about it to avoid this repetition.  Any help would be appreciated...thanks!!

    I tried to change getFileOperation to getFileOperation2 in one of the functions as follows but same problem appeared.
    function f3 (event:MouseEvent):void
    trace("f3 triggered");
    getFileOperation2.addEventListener(ResultEvent.RESULT, f4);
    Do you have an idea how I can avoid the same function from triggering twice?? thanks a lot

  • Listeners Problem  oracle11g R2 Data Guard RAC?

    Hi,
    I want to Static Register LISTENERDB in Data Guard RAC.
    LSNRCTL> start listenerdb
    Starting /u02/app/oracle/product/11.2.0/dbhome_1/bin/tnslsnr: please wait...
    TNSLSNR for HPUX: Version 11.2.0.1.0 - Production
    System parameter file is /u02/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
    Log messages written to /u02/app/oracle/diag/tnslsnr/drpdb1/listenerdb/alert/log.xml
    Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENERDB)))
    TNS-01155: Incorrectly specified SID_LIST_listenerdb parameter in LISTENER.ORA
    NL-00303: syntax error in NV string
    Listener failed to start. See the error message(s) above...
    LSNRCTL>
    Listene.ora file: user Oracle
    LISTENERDB=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENERDB)))) # line added by Agent
    ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENERDB=ON # line added by Agent
    SID_LIST_LISTENERDB =
    (SID_LIST =
    (SID_DESC =
    (ORACLE_HOME = /u02/app/oracle/product/11.2.0/dbhome_1)
    (SID_NAME = drpdb1)
    (GLOBAL_DBNAME = drpdb.nblitd.com)
    Please help
    Thanks
    Solaiman

    Hi,
    Please check below thread. Seems like same problem.
    http://www.orafaq.com/forum/t/87764/2/
    Cheers
    Sush

  • Reassign button listeners problem...

    I have a multilanguage site. I have a combo box that allows the user to change the language if the default system language isn't what they want to browse by. The site's button are added to the stage and then listeners are applies. When the language is changed, I'm removing the buttons and listeners and reassigning a new button to the old object and readding the listeners. However the listeners don't work, everything else is fine. I cannot figure out how to readd the listeners.
    Here's my code:I'll only use one button to keep it simple
    var products_btn;
    // after the language is determine it adds the appropriate button from the library to the stage as the button object
    products_btn = new EnProductsBTN();
      layer_3.addChild(products_btn);
      products_btn.name = "products_btn";
      products_btn.x = 255;
      products_btn.y = 544;
      products_btn.alpha = 0;
    // then i add the listeners by calling the setUpButtons function
    var mainButtons:Array = new Array();
    mainButtons = [
          {label:products_btn, link:'/products/', cover:"quarter"}
    function setUpButtons():void{
    for(var i:Number = 0; i < mainButtons.length; i++){
      var thisMC:MovieClip = mainButtons[i].label as MovieClip;
      var thisLink:String = mainButtons[i].link;
      var thisCover:String = mainButtons[i].cover;
      thisMC.addEventListener(MouseEvent.MOUSE_OVER,btnOver);
      thisMC.addEventListener(MouseEvent.MOUSE_OUT,btnOut);
      thisMC.addEventListener(MouseEvent.CLICK,buttonPressed);
      thisMC.buttonMode = true;
      thisMC.deepLink = thisLink;
      thisMC.cover = thisCover;
    // when the combo box is chaged to say spanish the buttons and listeners are removed in a function and then
    // it adds the new button to the button object
    products_btn = new EsProductsBTN();
      layer_3.addChild(products_btn);
      products_btn.name = "products_btn";
      products_btn.x = 255;
      products_btn.y = 544;
      products_btn.alpha = 0;
    // that places the new button on stage just fine and then i call the setUpButtons function again and it doesn't work.
    Why?

    unless you're calling setUpButtons every time you create a new button, you should use:
    var mainButtons:Array = new Array();
    var products_btn;
    // after the language is determine it adds the appropriate button from the library to the stage as the button object
    products_btn = new EnProductsBTN();
      layer_3.addChild(products_btn);
      products_btn.name = "products_btn";
      products_btn.x = 255;
      products_btn.y = 544;
      products_btn.alpha = 0;
    mainButtons.push({label:products_btn, link:'/products/', cover:"quarter"});
    function setUpButtons():void{
    for(var i:Number = 0; i < mainButtons.length; i++){
      var thisMC:MovieClip = mainButtons[i].label as MovieClip;
      var thisLink:String = mainButtons[i].link;
      var thisCover:String = mainButtons[i].cover;
      thisMC.addEventListener(MouseEvent.MOUSE_OVER,btnOver);
      thisMC.addEventListener(MouseEvent.MOUSE_OUT,btnOut);
      thisMC.addEventListener(MouseEvent.CLICK,buttonPressed);
      thisMC.buttonMode = true;
      thisMC.deepLink = thisLink;
      thisMC.cover = thisCover;
    // when the combo box is chaged to say spanish the buttons and listeners are removed in a function and then
    // it adds the new button to the button object
    products_btn = new EsProductsBTN();
      layer_3.addChild(products_btn);
      products_btn.name = "products_btn";
      products_btn.x = 255;
      products_btn.y = 544;
      products_btn.alpha = 0;
    // that places the new button on stage just fine and then i call the setUpButtons function again and it doesn't work.
    Why?

  • Oracle lsnrctl stops and hangs

    Hi ,
    I installed Oracle 11g in OEL Linux . OEL Linux is inside Oracle VM . I installed in another machine (OEL Linux inside Oracle VM) . In the other machine installed Weblogic 10.3.2 , SOA Suite and RCU . I've noticed connection problems and hangs since installation of RCU .Database listener gets down or hangs every time i try to connect with it . Installation took a lot of time (this was unusual ) but in the end was successful . When i start soa_server i see errors regarding ConnectionDeadSQLException and DataSource related , when i try lsnrctl status it hangs a lot and sometimes it stops by itself .I'm 100% sure that it's listeners problem (I've tested connection from other machines too). I'm attaching listener.ora file . Please help me cause this is really urgent for me
    # listener.ora Network Configuration File: /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
    # Generated by Oracle configuration tools.
    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.51)(PORT = 1521))
    SUBSCRIBE_FOR_NODE_DOWN_EVENT_LISTENER=OFF
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME = PLSExtProc)
    (ORACLE_HOME = /u01/app/oracle/product/11.2.0/dbhome_1)
    (PROGRAM = extproc)
    (SID_DESC =
    (GLOBAL_DBNAME = orcl)
    (ORACLE_HOME =/u01/app/oracle/product/11.2.0/dbhome_1)
    (SID_NAME = orcl)
    ADR_BASE_LISTENER = /u01/app/oracle

    Ok ,
    i changed it , now i can connect with ora.facilization.net but still seems slow
    For example when i try to connect with rcu for creatin repositories the response is delayed with
    10secs or more even for a simple connection , connection from navicat takes a lot and in the meantime
    i exexute lsnrctl status from terminal it hangs a lot .
    This is log.xml again
    <msg time='2012-01-20T12:37:02.677-05:00' org_id='oracle' comp_id='tnslsnr'
    type='UNKNOWN' level='16' host_id='ora.facilization.net'
    host_addr='192.168.1.51'>
    <txt>20-JAN-2012 12:37:02 * (CONNECT_DATA=(CID=(PROGRAM=)(HOST=__jdbc__)(USER=oracle))(service_name=ORCL.FACILIZATION.NET)(server=dedicated)) * (ADDRESS=(PROTOCOL=tcp)(HOST=192.168.1.53)(PORT=39979)) * establish * ORCL.FACILIZATION.NET * 0
    </txt>
    </msg>
    <msg time='2012-01-20T12:37:02.677-05:00' org_id='oracle' comp_id='tnslsnr'
    type='UNKNOWN' level='16' host_id='ora.facilization.net'
    host_addr='192.168.1.51'>
    <txt>20-JAN-2012 12:37:02 * service_update * orcl * 0
    </txt>
    </msg>
    <msg time='2012-01-20T12:37:02.678-05:00' org_id='oracle' comp_id='tnslsnr'
    type='UNKNOWN' level='16' host_id='ora.facilization.net'
    host_addr='192.168.1.51'>
    <txt>20-JAN-2012 12:37:02 * service_update * orcl * 0
    </txt>
    </msg>
    <msg time='2012-01-20T12:37:02.679-05:00' org_id='oracle' comp_id='tnslsnr'
    type='UNKNOWN' level='16' host_id='ora.facilization.net'
    host_addr='192.168.1.51'>
    <txt>WARNING: Subscription for node down event still pending
    </txt>
    </msg>
    <msg time='2012-01-20T12:37:02.679-05:00' org_id='oracle' comp_id='tnslsnr'
    type='UNKNOWN' level='16' host_id='ora.facilization.net'
    host_addr='192.168.1.51'>
    <txt>20-JAN-2012 12:37:02 * (CONNECT_DATA=(CID=(PROGRAM=)(HOST=ora.facilization.net)(USER=oracle))(COMMAND=status)(ARGUMENTS=64)(SERVICE=LISTENER)(VERSION=186646784)) * status * 0
    </txt>
    </msg>
    <msg time='2012-01-20T12:37:05.681-05:00' org_id='oracle' comp_id='tnslsnr'
    type='UNKNOWN' level='16' host_id='ora.facilization.net'
    host_addr='192.168.1.51'>
    <txt>20-JAN-2012 12:37:05 * service_update * orcl * 0
    </txt>
    </msg>
    <msg time='2012-01-20T12:37:11.689-05:00' org_id='oracle' comp_id='tnslsnr'
    type='UNKNOWN' level='16' host_id='ora.facilization.net'
    host_addr='192.168.1.51'>
    <txt>20-JAN-2012 12:37:11 * service_update * orcl * 0
    </txt>
    </msg>
    <msg time='2012-01-20T12:37:32.715-05:00' org_id='oracle' comp_id='tnslsnr'
    type='UNKNOWN' level='16' host_id='ora.facilization.net'
    host_addr='192.168.1.51'>
    <txt>20-JAN-2012 12:37:32 * service_update * orcl * 0
    </txt>
    </msg>

  • Always on top windows

    How can I make "Always on top" window in Java?
    Thanks

    Hi, i a using jdk1.3 on mandrake linux, how to make Jwindow reside on top of all the other windows, i've tried using the listeners, problem is once the focus moves to any of the child component of the window, the focus listener for Jwindow will not work, even requestFocus on the jwindow doesn't get the focus on the window, i can't take JFrame, (don't want title bar), if any body can help with JNI code on linux to make the Jwindow always on top.
    shivajee

  • Removing a Button Event Listener on a Specific Frame and Reactivating it on Next Frame

    Hi , i am trying to develop a Slideshow where Next Button needs to behave in a certain way on a specific Frame , lets say a Specific Condition is met only then Next Button would work , I have been able to achieve that but problem is the Button Retains its Event Listener even on the next Frame , whereas  i have already included removeEventListener on the next frame with a new Function for the button , but its doesnt take it like that.
    Can anyone help please ?

    Hello Ned,
    I have fixed the issue with few Frame , but where we have the conditions to be met on two consecutive frames , I am not able to achieve that.
    here is the Code on my first Frame.
    FRAME1
    stop();
    slidecounter.text = String(this.currentFrame - 1 + "/" + indexframe);
    mc_prog.width = 0;
    //LIBRARIES TO BE IMPORTED ///////////////////////////////////////////////////////////
    import flash.events.MouseEvent;
    //VARIALBLES INITIATED
    var score:Number = 0;
    var questions:Number = 0;
    var qtotal:Number = 11;
    var attempt:Number = 0;
    var indexframe:int;
    indexframe = this.totalFrames - 1;
    var notes:Array = new Array();
    var count:int;
    count = 0;
    var backcounter:int;
    backcounter = 0;
    var count2:int;
    count2 = 0;
    var backcounter2:int;
    backcounter2 = 0;
    var count3:int;
    count3 = 0;
    var backcounter3:int;
    backcounter3 = 0;
    // MOVIE CLIPS INITITATED ////////////////////////////////////////////////////////////////
    var volbutton1:volcontrol;//VOLUME BUTTON ROLLOVER MOVIE CLIP
    volbutton1 = new volcontrol();
    var clist:courselist;//VOLUME COURSE LIST ROLLOVER MOVIE CLIP
    clist = new courselist();
    var pop1:Mc_slide9 = new Mc_slide9;
    pop1 = new Mc_slide9;
    var pop2:Mc_slide13 = new Mc_slide13;
    pop2 = new Mc_slide13;
    var pop3:Mc_slide17 = new Mc_slide17;
    pop3 = new Mc_slide17;
    //BUTTONS INITIATED
    btn_nxt.addEventListener(MouseEvent.CLICK, fl_ClickToGoToNextFrame);//NEXT SLIDE BUTTON
    btn_bck.addEventListener(MouseEvent.CLICK, backbtn);//BACK BUTTON
    btn_loc.addEventListener(MouseEvent.CLICK, fl_ClickToGoToWebPage); //LIST OF COURSES BUTTON
    btn_notice1.addEventListener(MouseEvent.CLICK, loadnotice1);
    pop1.closebtn.addEventListener(MouseEvent.CLICK, unloadbtn1);
    btn_notice2.addEventListener(MouseEvent.CLICK, loadnotice2);
    pop2.closebtn.addEventListener(MouseEvent.CLICK, unloadbtn2);
    btn_notice3.addEventListener(MouseEvent.CLICK, loadnotice3);
    pop3.closebtn.addEventListener(MouseEvent.CLICK, unloadbtn3);
    //VOLUME BUTTON ROLL OVER FUNCTION EVENT LISTENERS ///////////////////////////////////////
    btn_vol.addEventListener(MouseEvent.ROLL_OVER,vol);
    btn_vol.addEventListener(MouseEvent.ROLL_OUT,volout);
    btn_loc.addEventListener(MouseEvent.ROLL_OVER,coursel);
    btn_loc.addEventListener(MouseEvent.ROLL_OUT,corlist);
    // FUNCTIONS INITIATED /////////////////////////////////////////////////////////////////
    function fl_ClickToGoToNextFrame(event: MouseEvent): void
      nextFrame();
    function backbtn(event:MouseEvent):void{
       prevFrame();
    function fl_ClickToGoToWebPage(event: MouseEvent): void {
      navigateToURL(new URLRequest("https://www.onlineinduction.com/fmgl/courselist.php?ist=2&type=Vendor Employee Inductions"), "_self");
    //VOLUME BUTTON ROLLOVER EFFECT FUNCTION
    function vol(e:MouseEvent):void
      addChild(volbutton1);
      //popup_instance.width = 675;
      //popup_instance.height = 300;
       if(this.currentFrame == 2)
        volbutton1.x = 150;
        volbutton1.y = 528;
       else{
        volbutton1.x = 278;
        volbutton1.y = 528;
      function volout (e:MouseEvent):void {
        removeChild(volbutton1);
       function coursel(e:MouseEvent):void {
       addChild(clist);
        if(this.currentFrame == 2)
         clist.x = 85;
         clist.y = 532;
        else if(this.currentFrame == 5){
         clist.x = 115;
         clist.y = 325;
        else{
         clist.x = 175;
         clist.y = 532;
      function corlist (e:MouseEvent):void {
        removeChild(clist);
    function loadnotice1(Event:MouseEvent):void//FRAME 9 FUNCTION FOR IMPORTANT NOTICE
      if ( count == 1 && stage.contains(pop1))
       removeChild(pop1);
        if(count == 1)
         nextFrame();
        else
         addChild(pop1);
         pop1.x = 40;
         pop1.y = 120;
         count = 1;
      trace("Counter Value:" + count);
    function loadnotice2(Event:MouseEvent):void//FRAME 9 FUNCTION FOR IMPORTANT NOTICE
      if ( count2 == 1 && stage.contains(pop2))
       removeChild(pop2);
        if(count == 2)
         nextFrame();
        else
         addChild(pop2);
         pop2.x = 40;
         pop2.y = 120;
         count2 = 1;
      trace("Counter Value:" + count);
    function loadnotice3(Event:MouseEvent):void//FRAME 9 FUNCTION FOR IMPORTANT NOTICE
      if ( count3 == 1 && stage.contains(pop3))
       removeChild(pop3);
        if(count == 3)
         nextFrame();
        else
         addChild(pop3);
         pop2.x = 40;
         pop2.y = 120;
         count2 = 1;
      trace("Counter Value:" + count);
    function nextframe9(event: MouseEvent): void
        if(count == 1 && stage.contains(pop1) )
           removeChild(pop1);
        if(count == 1)
         nextFrame();
        else
         addChild(pop1);
         pop1.x = 40;
         pop1.y = 120;
         count = 1;
    function nextframe13(event: MouseEvent): void
        if(count2 == 1 && stage.contains(pop2) )
           removeChild(pop2);
        if(count2 == 1)
         nextFrame();
        else
         addChild(pop2);
         pop2.x = 40;
         pop2.y = 120;
         count2 = 1;
    function nextframe17(event: MouseEvent): void
        if(count3 == 1 && stage.contains(pop3) )
           removeChild(pop3);
        if(count3 == 1)
         nextFrame();
        else
         addChild(pop3);
         pop3.x = 40;
         pop3.y = 120;
         count3 = 1;
    function backbtnscript1(event:MouseEvent):void
       if(stage.contains(pop1) )
          removeChild(pop1);
          backcounter = 1;
          trace("back" + backcounter);
          prevFrame();
    function unloadbtn1 (e:MouseEvent):void {
      removeChild(pop1);
    function backbtnscript2(event:MouseEvent):void
       if(stage.contains(pop2) )
          removeChild(pop2);
          backcounter2 = 1;
          trace("back" + backcounter2);
          prevFrame();
    function unloadbtn2 (e:MouseEvent):void {
      removeChild(pop2);
    function backbtnscript3(event:MouseEvent):void
       if(stage.contains(pop3) )
          removeChild(pop3);
          backcounter3 = 1;
          trace("back" + backcounter3);
          prevFrame();
    function unloadbtn3 (e:MouseEvent):void {
      removeChild(pop3);
    //SLIDE COUNTER
    and here is the Code on all the Frames where I need to call in specific Listeners
    FOR EXAMPLE ON FRAME 8,9,10,
    Here Is the Code ,
    FRAME 8
    stop();
    slidecounter.text = String(this.currentFrame - 1 + "/" + indexframe);
    count = 0;
    backcounter = 0;
    btn_nxt.addEventListener(MouseEvent.CLICK , fl_ClickToGoToNextFrame);
    btn_bck.addEventListener(MouseEvent.CLICK, backbtn);
    btn_bck.removeEventListener(MouseEvent.CLICK , backbtnscript1);
    btn_nxt.removeEventListener(MouseEvent.CLICK , nextframe9);
    pop1.closebtn.addEventListener(MouseEvent.CLICK, unloadbtn1);
    //btn_notice1.addEventListener(MouseEvent.CLICK , loadnotice1);
    FRAME 9
    stop();
    slidecounter.text = String(this.currentFrame - 1 + "/" + indexframe);
    //POPUP FUNCTION
    count = 0;
    btn_nxt.removeEventListener(MouseEvent.CLICK , fl_ClickToGoToNextFrame);
    btn_bck.removeEventListener(MouseEvent.CLICK, backbtn);
    btn_bck.addEventListener(MouseEvent.CLICK , backbtnscript1);
    btn_nxt.addEventListener(MouseEvent.CLICK , nextframe9);
    btn_notice1.addEventListener(MouseEvent.CLICK , loadnotice1);
    FRAME 10
    stop();
    slidecounter.text = String(this.currentFrame - 1 + "/" + indexframe);
    count = 0;
    backcounter = 0;
    btn_nxt.addEventListener(MouseEvent.CLICK , fl_ClickToGoToNextFrame);
    btn_bck.addEventListener(MouseEvent.CLICK, backbtn);
    btn_bck.removeEventListener(MouseEvent.CLICK , backbtnscript1);
    btn_nxt.removeEventListener(MouseEvent.CLICK , nextframe9);
    pop1.closebtn.addEventListener(MouseEvent.CLICK, unloadbtn1);
    I am repeating this Pattern on each frame set where I need these Listeners ,
    Problem is with the next one where I have two consecutive frames have different conditions to meet, any ideas how would I disable and enable listeners respectively on these frames ?
    I hope I am not confusing this very much ?;(

  • Is there a problem with JFrame and window listeners?

    As the subject implies, i'm having a problem with my JFrame window and the window listeners. I believe i have implemented it properly (i copied it from another class that works). Anyway, none of the events are caught and i'm not sure why. Here's the code
    package gcas.gui.plan;
    import java.awt.BorderLayout;
    import java.awt.Component;
    import java.awt.Container;
    import java.awt.event.WindowEvent;
    import java.awt.event.WindowListener;
    import java.util.Hashtable;
    import javax.swing.JDialog;
    import javax.swing.JFrame;
    import gcas.plandata.TaskData;
    import gcas.util.GCASProperties;
    import gcas.gui.planlist.MainPanel;
    * MainFrame extends JPanel and is the main class for the plan details window
    public class MainFrame extends JFrame implements WindowListener
         * the container for this window
        private Container contentPane;
         * a string value containing the name of the plan being viewed
        private String labelText;
         * a string value containing the name of the window (GCAS - plan list)
        private static String title;
         * an instance of JDialog class
        private static MainFrame dialog;
         * hashTable that correlates the task name to its id as found in the
         * plan
        private Hashtable taskNameToId = new Hashtable();
         * an instance of taskSetPane.  This is the current instance of taskSetPane
         * being viewed
        private PlanTaskSet currentPane;
         * instance of TaskData class.  Each instance will hold information on
         * an individual task
        private TaskData taskData;
         * hashTable containing instances of the taskSetPane class
        private Hashtable taskSetPanes = new Hashtable();
         * an instance of the OuterPanel class
        OuterPanel mainPanel;
         * an instance of the ButtonPanel class
        ButtonPanel buttonsPanel;
         * an instance of the LeftPanel class
        LeftPanel leftPanel;
         * an instance of the the GCASProperties class
        GCASProperties gcasProps;
        private static MainFrame thisPlanMain = null;
        private MainPanel planListMain;
         * constructor for MainFrame
         * @param frame the parent frame calling this class
         * @param locationComp the location of the component that initiated the opening of the dialog
         * @param labelText the name of the plan that is being viewed
         * @param title title of window
        private MainFrame(JFrame frame, Component locationComp, String labelText,
                String title)
            super(title);
            gcasProps = GCASProperties.getInstance();
            mainPanel = new OuterPanel(labelText, currentPane,
                    taskNameToId, taskSetPanes);
            leftPanel = mainPanel.getLeftPanel();
            System.out.println("LABLE: " + labelText);
            leftPanel.setMainPanelContents();
            buttonsPanel = new ButtonPanel(labelText, taskSetPanes,
                    taskNameToId, leftPanel);
            contentPane = getContentPane();
            contentPane.add(mainPanel, BorderLayout.CENTER);
            contentPane.add(buttonsPanel, BorderLayout.PAGE_END);
            this.addWindowListener(this);
            this.labelText = labelText;
            pack();
            setLocationRelativeTo(locationComp);
            this.setVisible(true);
            planListMain = MainPanel.getInstance();
            planListMain.setVisible(false);
        public static MainFrame getInstance(JFrame frame, Component locationComp, String labelText,
                String title)
            if (thisPlanMain == null)
                thisPlanMain = new MainFrame(frame, locationComp, labelText,
                        title);
            return thisPlanMain;
        public static MainFrame getDialogObject()
        {   //from the location this is called (ButtonPanel), this will never
            //be null
            return thisPlanMain;
        public static void setABMDDialogNull()
            thisPlanMain = null;
         * returns an instance of MainFrame
         * @return MainFrame instance
        public static MainFrame getDialog()
            return dialog;
         * setter for MainFrame
         * @param aDialog a MainFrame instance
        public static void setDialog(MainFrame aDialog)
            dialog = aDialog;
         * window opened event
         * @param windowEvent the window event passed to this method
        public void windowOpened(WindowEvent windowEvent)
         * The window event when a window is closing
         * @param windowEvent the window event passed to this method
        public void windowClosing(WindowEvent windowEvent)
            gcasProps.storeProperties("PlanList");
            MainPanel abmd = MainPanel.getInstance();
    //        planMain = this.getDialogObject();
    //        if(planMain != null)
    //            planMain.setVisible(false);
    //            abmd.setVisible(true);
    //            planMain.setABMDDialogNull();
            if(this.getDialogObject()!= null)
                abmd.setVisible(true);
                setVisible(false);
                setABMDDialogNull(); 
         * Invoked when the Window is set to be the active Window
         * @param windowEvent the window event passed to this method
        public void windowActivated(WindowEvent windowEvent)
         * Invoked when a window has been closed as the result of calling dispose on the window
         * @param windowEvent the window event passed to this method
        public void windowClosed(WindowEvent windowEvent)
         * Invoked when a Window is no longer the active Window
         * @param windowEvent the window event passed to this method
        public void windowDeactivated(WindowEvent windowEvent)
            System.out.println("HI");
         * Invoked when a window is changed from a minimized to a normal state
         * @param windowEvent the window event passed to this method
        public  void windowDeiconified(WindowEvent windowEvent)
            //we could have code here that changed the way alerts are done
           System.out.println("Invoked when a window is changed from a minimized to a normal state.");
         * Invoked when a window is changed from a normal to a minimized state
         * @param windowEvent the window event passed to this method
        public  void windowIconified(WindowEvent windowEvent)
            //we could have code here that changed the way alerts are done
    //        System.out.println("Invoked when a window is changed from a normal to a minimized state.");
    }anyone know whats wrong?

    It turned out that my ide was running the old jar and not updating it, so no matter what code i added, it wasn't being seen. Everything should be fine now.

  • 10g: problem with similar named listeners

    Hi,
    env:
    2 node OEL cluster (not rac, a linux cluster)
    11.2.0.3 GI
    11.2.0.3 and 10.2.0.5 DB's
    The problem seems to be that lsnrctl in 10g is only using the first 12-13 characters of the listener name.
    I have a listener configured with the name listener_prodXXX, when I configure another listener named listener_prodYYY and want to start ist:
    lsnrctl start listener_prodYYY
    TNS-01106: Listener using listener name listener_prodXXX has already been started.
    ps -ef |grep -i listener_prod
    oracle 2784 1 0 13:03 ? 00:00:00 /oracle/product/10.2.0/XXX/bin/tnslsnr listener_prodXXX -inherit
    is there a rule for naming the listeners?
    confused greetings
    Daniel

    Of course I was searching docs/metalink before but couldn't find anything there, so I was asking here.No sign of searching exists in your posts
    If you have only one listener with multiple db's and want to do some maintenance on one of them, how do you avoid user connecting to it?Put the database in restricted session mode
    I don't think its forbidden to use multiple listeners, so if I'm having a problem with the configuration the forum should be the place to ask, isn't it?It is not forbidden to use multiple listeners, but in 999 out of 1000 cases it is not required, and people 'think' they need multiple listeners for the wrong reasons.
    Your post is no exception.
    So, yes, if you want to setup multiple listeners, without apparent and/or sound reasons, I will explain you don't need them/.
    There is nothing wrong about that, isn't it? Many people here 'think' they know Oracle, few have experience and know they do.
    Sybrand Bakker
    Senior Oracle DBA

  • Problems with listeners

    i tried making some simple programs to get familiar with listeners.
    i encountered a problem:
    what i'm trying to do is to make a JFrame and add some swings to it. and i want the main frame to proccess the events from keyboard and mouse. i used KeyListener and Mouse Listener, and the result is that:
    when my frame is empty the events go to it and everything works fine (but my frame is empty and so useless...) but when i add even one component to my frame all the events stop getting to the frame and probably go to the component. that is even when that component is not selected
    how can i bypass that problem without
    Component[] c= get Components()
    for (i=0;i<c.size();i++)
    c.addListener.....
    aviad

    as you wish.
    i checked it further and te problem is only when there are components that can get focus (not jpanel jlabel..)
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    public class KeyCheck extends JFrame implements KeyListener,MouseListener{
        int i=0;
        public KeyCheck(){
            setSize(200,200);
            getContentPane().add(new JButton());
            addMouseListener(this);
            addKeyListener(this);
            show();
    public static void main(String[] args){
        new KeyCheck();
        public void keyPressed(KeyEvent e) {
            System.out.println("Key Pressed"+(i++));
        public void keyReleased(KeyEvent e) {
            System.out.println("Key released"+(i++));
        public void keyTyped(KeyEvent e) {
            System.out.println("Key typed"+(i++));
        public void mouseClicked(MouseEvent e) {
            System.out.println("mouse clicked"+(i++));
        public void mouseEntered(MouseEvent e) {
            System.out.println("mouse entered"+(i++));
        public void mouseExited(MouseEvent e) {
            System.out.println("mouse exited"+(i++));
        public void mousePressed(MouseEvent e) {
            System.out.println("mouse pressed"+(i++));
        public void mouseReleased(MouseEvent e) {
            System.out.println("mouse released"+(i++));
    }

  • Listeners having problems listening to my podcasts

    My podcasts are created in GarageBand. Posted via iWeb and searchable/visible in iTunes. I can hear them on my website and on iTunes on MacBook Pro. Others are telling me that they have trouble listening to them on iPods, iPads and iPhones. I tried on my phone via the iTunes store and had to had a podcast app.
    Is there something about the format I'm saving in that is creating a problem? Are there easy "instructions" that I can give listeners on my website about listening to them or downloading QuickTime?
    Thanks for the help. Here are the links to my podcasts
    https://itunes.apple.com/us/podcast/working-gratitude-real-people./id569249288
    http://www.odonatacoaching.com/Odonata/Working_Gratitude.html

    I can see no easy answer to this one, and I don't have an iOS device to check things. The most obvious reason would be the 'byte-range requests' issue, but it appears that your server does handle this. The only other thing I can see is that your media filenames have spaces in them. The feed is handling this correctly by susbstituting the codde %20 for each space, so it shouldn't be a problem (and isn't on iTunes on a Mac) but it's not a good idea to have space, which are not allowed in a URL, and possibly it's upsetting iOS devices.

  • Problem with Listeners/ requestFocus()

    Hello,
    I am new to Java (started learning two months back), There is a problem with the requestFocus() in the focusListener. The program does not return the focus to the object indicated in the requestFocus but it shows multiple cusors!!
    The faculity at the institute where I am learning could not rectify the error.
    Is the error because of the myMethod() which I am using. I had made this method to prove to my professor that we can reduce the code drastically while using the gridbaglayout.
    The code which I had written is as under:
    // file name ShopperApplet.java
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class ShopperApplet extends JApplet implements ActionListener, FocusListener,Runnable
         //static JPanel sP;
         //static JPanel oP;
         JTabbedPane tabbedPane = new JTabbedPane();
         JPanel sP;
         JPanel oP;
         JPanel pwd = new JPanel();
         // Layout Decleration of oP
         GridBagLayout ordL = new GridBagLayout();
         GridBagConstraints ordC = new GridBagConstraints();
         // Layout Decleration of sP
         FlowLayout flow = new FlowLayout();
         // Variables of sP
              JTextField textShopperId;
              JPasswordField textPassword;
              JTextField textFirstName ;
              JTextField textLastName ;
              JTextField textEmailId ;
              JTextField textAddress ;
              JComboBox comboCity ;
              JTextField textState ;
              JTextField textCountryId ;
              JTextField textZipCode ;
              JTextField textPhone ;
              JTextField textCreditCardNo ;
              JRadioButton rbVisa;
              JRadioButton rbMaster;
              JRadioButton rbAmEx;
              ButtonGroup BGccType;
              //JComboBox comboCreditCardType;
              //JTextField textExperyDate;
              JComboBox cmbDt;
              JComboBox cmbMth;
              JComboBox cmbYear;
              JButton btnSubmit;
              JButton btnReset;          
         // Variables of oP
              // Variable Decleration od oP
              JTextField txtOrderNo;
              JTextField txtToyId;
              JTextField txtQty;
              JRadioButton rbYes;     
              JRadioButton rbNo;
              ButtonGroup bgGiftWrap;
              JComboBox cmbWrapperId;
              JTextField txtMsg;
              JTextField txtToyCost;
              JButton btnOSubmit;
              JButton btnOReset;     
         // Variables of pwd
              JTextField txtShopperId;
              JPasswordField txtPassword;
              JButton btnPSubmit;
              JButton btnPReset;     
              JButton btnPNew;
              JButton btnPLogoff;
              JLabel lblN, lblN1;     
              Thread t,t1;
         Font TNR = new Font("Times New Roman",1,15);
         Font arial = new Font("Arial",2,15);
         public void sPDet()
              //Variable Decleration of sP
              textShopperId = new JTextField(6);
              textPassword = new JPasswordField(4);
              textPassword.addFocusListener(this);
              //textPassword = new JTextField(4);
              textPassword.setEchoChar('*');
              textFirstName = new JTextField(20);
              textLastName = new JTextField(20);
              textEmailId = new JTextField(25);
              textAddress = new JTextField(20);
              String cityList[] = {"New Delhi", "Mumbai", "Calcutta", "Hyderabad"};
              comboCity = new JComboBox(cityList);
              comboCity.setEditable(true);
              textState = new JTextField(30);
              textCountryId = new JTextField(25);
              textZipCode = new JTextField(6);
              textPhone = new JTextField(25);
              textCreditCardNo = new JTextField(25);
              String cardTypes[] = {"Visa", "Master Card", "American Express"};
              //comboCreditCardType = new JComboBox(cardTypes);
              rbVisa = new JRadioButton("Visa");
              rbMaster = new JRadioButton("Master Card");
              rbAmEx = new JRadioButton("American Express");
              BGccType = new ButtonGroup();
              BGccType.add(rbVisa);
              BGccType.add(rbMaster);
              BGccType.add(rbAmEx);
              String stDt[] = {"1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31"};
              String stMth[] = {"January","February","March","April","May","June","July","August","September","October","November","December"};
              String stYear[] = {"2001","2002","2003","2004","2005","2006","2007","2008","2009","2010"};
              cmbDt = new JComboBox(stDt);
              cmbMth = new JComboBox(stMth);
              cmbYear = new JComboBox(stYear);
              //textExperyDate = new JTextField(10);
              btnSubmit = new JButton("Submit");
              btnReset = new JButton("Reset");
              // Adding Layout Controls
              sP.setLayout(ordL);
              sP.setBackground(Color.green);
              myLayout(textShopperId,3,1,sP,"FM","Shopper Id");
              myLayout(textPassword,3,2,sP,"FM","Password");
              myLayout(textFirstName,3,3,sP,"FM","First Name") ;
              myLayout(textLastName,3,4,sP,"FM","Last Name") ;
              myLayout(textEmailId,3,5,sP,"FM","E-Mail Id") ;
              myLayout(textAddress,3,6,sP,"FM", "Address") ;
              myLayout(comboCity,3,7,sP,"FM","City") ;
              myLayout(textState,3,8,sP,"FM","State") ;
              myLayout(textCountryId,3,9,sP,"FM","Country") ;
              myLayout(textZipCode,3,10,sP,"FM","Zip Code") ;
              myLayout(textPhone,3,11,sP,"FM","Phone") ;
              myLayout(textCreditCardNo,3,12,sP,"FM","Credit Card No.") ;
              //myLayout(rbVisa,3,13,sP);
              JPanel newPanel = new JPanel();
              newPanel.add(rbVisa);
              newPanel.add(rbMaster);
              newPanel.add(rbAmEx);
              myLayout(newPanel,3,13,sP,"FM","Credit Card Type");
              //myLayout(rbMaster,4,13);
              //myLayout(rbAmEx,5,13);
              JPanel newPanel1 = new JPanel();
              newPanel1.add(cmbDt);
              newPanel1.add(cmbMth);
              newPanel1.add(cmbYear);
              myLayout(newPanel1,3,14,sP,"FM","Expiry Date");
              //myLayout(textExperyDate,3,14,sP,"FM");
              myLayout(btnSubmit,1,17,sP,"AL","Submit");
              myLayout(btnReset,3,17,sP,"AL","Reset");          
         public void oPDet()
              txtOrderNo = new JTextField(10);
              txtToyId = new JTextField(10);
              txtQty = new JTextField(10);
              rbYes = new JRadioButton("Yes");
              rbNo = new JRadioButton("No");
              bgGiftWrap = new ButtonGroup();
              bgGiftWrap.add(rbYes);
              bgGiftWrap.add(rbNo);
              String wrapperTypes[] = {"Blue Stripes", "Red Checks", "Green Crosses","Yellow Circles", "Red & Purple Stripes"};
              cmbWrapperId = new JComboBox(wrapperTypes);
              txtMsg = new JTextField(10);
              txtToyCost = new JTextField(10);
              btnOSubmit = new JButton("Submit");
              btnOReset = new JButton("Reset");
              // Adding Controls to oP
              oP.setLayout(ordL);
              oP.setBackground(Color.yellow);
              myLayout(txtOrderNo,3,1,oP,"FM","Order No.");
              myLayout(txtToyId,3,2,oP,"FM","Toy Id");
              myLayout(txtQty,3,3,oP,"FM","Quantity");
              myLayout(rbYes,3,4,oP,"M");
              myLayout(rbNo,4,4,oP,"M");
              myLayout(cmbWrapperId,3,5,oP,"M","Wrapper Id");
              myLayout(txtMsg,3,6,oP,"FM","Message");
              myLayout(txtToyCost,3,7,oP,"FM","Toy Cost");
              myLayout(btnOSubmit,1,8,oP,"AL","Submit");
              myLayout(btnOReset,3,8,oP,"AL","Reset");          
         public void pwdDet()
              pwd.setLayout(ordL);
              pwd.setBackground(Color.green);
              t = new Thread(this);
              t.start();
              t1 = new Thread(this);
              t1.start();
              lblN = new JLabel("");
              lblN1 = new JLabel("");
              txtShopperId = new JTextField(10);
              txtPassword = new JPasswordField(10);
              btnPSubmit = new JButton("Submit") ;
              btnPReset = new JButton("Reset");     
              btnPNew = new JButton("New Member");
              btnPLogoff = new JButton("Log Off");
              pwd.setLayout(ordL);
              pwd.setBackground(Color.yellow);
              myLayout(lblN,3,7,pwd);
              myLayout(lblN1,3,8,pwd);
              myLayout(txtShopperId,3,1,pwd,"FM","Shopper Id.");
              myLayout(txtPassword,3,2,pwd,"FM","Password");
              myLayout(btnPSubmit,2,4,pwd,"AL","Submit");
              myLayout(btnPReset,3,4,pwd,"AL","Reset");          
              myLayout(btnPNew,2,5,pwd,"AL","New");
              myLayout(btnPLogoff,3,5,pwd,"AL","Log Off");
         public void run()
              int ctr =0;
              String ili[] = {"India","is","a","Great","Country"};
              int ctr1 = 0;
              String iib[] = {"India","is","the","Best"};
              Thread myThread = Thread.currentThread();
              if (myThread == t)
                   while (t != null)
                        lblN.setText(ili[ctr]);
                        ctr++;
                        if (ctr >=5) ctr=0;
                        try
                             t.sleep(500);
                        catch(InterruptedException e)
                             showStatus("India is a great Country has been interrupter");
              else
                   while (t1 != null)
                        lblN1.setText(iib[ctr1]);
                        ctr1++;
                        if (ctr1 >=4) ctr1=0;
                        try
                             t1.sleep(1000);
                        catch(InterruptedException e)
                             showStatus("India is the best has been interrupter");
         public void myLayout(JComponent aObj, int x, int y, JPanel aPanel,String aListener,String toolTip)
              ordC.anchor=GridBagConstraints.NORTHWEST;
              JLabel aLabel = new JLabel(toolTip);
              ordC.gridx = x-1;
              ordC.gridy = y;
              ordL.setConstraints(aLabel,ordC);
              aPanel.add(aLabel);
              aObj.setToolTipText("Enter "+toolTip+" here");
              aObj.setForeground(Color.red);
              aObj.setBackground(Color.green);
              if (aListener.indexOf("F")     != -1)
                   aObj.addFocusListener(this);
              //if (aListener.indexOf("M")     != -1)
                   //aObj.addMouseListener(this);
              aObj.setFont(TNR);
              ordC.gridx = x;
              ordC.gridy = y;
              ordL.setConstraints(aObj,ordC);
              aPanel.add(aObj);
         public void myLayout(JComponent aObj, int x, int y, JPanel aPanel,String aListener)
              ordC.anchor=GridBagConstraints.NORTHWEST;
              aObj.setForeground(Color.red);
              aObj.setBackground(Color.green);
              if (aListener.indexOf("F")     != -1)
                   aObj.addFocusListener(this);
              //if (aListener.indexOf("M")     != -1)
                   //aObj.addMouseListener(this);
              aObj.setFont(TNR);
              ordC.gridx = x;
              ordC.gridy = y;
              ordL.setConstraints(aObj,ordC);
              aPanel.add(aObj);
         public void myLayout(JButton aObj, int x, int y, JPanel aPanel,String aListener, String toolTip)
              aObj.setToolTipText(toolTip);
              ordC.anchor=GridBagConstraints.NORTHWEST;
              aObj.setForeground(Color.red);
              if (aListener.indexOf("F")     != -1)
                   aObj.addFocusListener(this);
              //if (aListener.indexOf("M")     != -1)
                   //aObj.addMouseListener(this);
              if (aListener.indexOf("A")     != -1)
                   aObj.addActionListener(this);
              aObj.setFont(TNR);
              ordC.gridx = x;
              ordC.gridy = y;
              ordL.setConstraints(aObj,ordC);
              aPanel.add(aObj);
         public void myLayout(JTextField aObj, int x, int y, JPanel aPanel,String aListener,String toolTip)
              ordC.anchor=GridBagConstraints.NORTHWEST;
              //aObj = new JTextField(10);
              JLabel aLabel = new JLabel(toolTip);
              ordC.gridx = x-1;
              ordC.gridy = y;
              ordL.setConstraints(aLabel,ordC);
              aPanel.add(aLabel);
              aObj.setToolTipText("Enter "+toolTip+" here");
              aObj.setForeground(Color.red);
              if (aListener.indexOf("F")     != -1)
                   aObj.addFocusListener(this);
              //if (aListener.indexOf("M")     != -1)
              //     aObj.addMouseListener(this);
              if (aListener.indexOf("A")     != -1)
                   aObj.addActionListener(this);
              aObj.setFont(TNR);
              ordC.gridx = x;
              ordC.gridy = y;
              ordL.setConstraints(aObj,ordC);
              aPanel.add(aObj);
         public void myLayout(JLabel aObj, int x, int y, JPanel aPanel)
              ordC.anchor=GridBagConstraints.SOUTH;
              aObj.setForeground(Color.blue);
              aObj.setFont(TNR);
              ordC.gridx = x;
              ordC.gridy = y;
              ordL.setConstraints(aObj,ordC);
              aPanel.add(aObj);
         public void init()
              getContentPane().add(tabbedPane);
              sP = new JPanel();
              sPDet();
              oP = new JPanel();
              oPDet();
              pwdDet();
              tabbedPane.addTab("Login",null,pwd,"Login");
              tabbedPane.addTab("Shopper",null,sP,"Shopper Details");
              tabbedPane.addTab("Order",null,oP,"Order Details");
              tabbedPane.setEnabledAt(2, false);
              tabbedPane.setEnabledAt(1, false);
         public void actionPerformed(ActionEvent e)
              Object obj = e.getSource();
              if (obj == btnSubmit)
                   if (validShopperId() == false) return;
                   if (validPassword() == false) return;
                   if (validFirstName() == false) return ;
                   if (validLastName() == false) return ;
                   if (validEmailId() == false) return;
                   if (validAddress() == false) return;
                   if (validState() == false) return;
                   if (validCountryId() == false) return;
                   if (validZipCode() == false) return;
                   if (validCreditCardNo() == false) return ;
                   resetShopper();
                   tabbedPane.setEnabledAt(1,false);
                   tabbedPane.setEnabledAt(2,false);
                   tabbedPane.setSelectedIndex(0);
                   // also can be written as tabbedPane.setSelectedComponent(pwd);
                   //tabbedPane.remove(sP);
              if (obj == btnReset)
                   resetShopper();
                   tabbedPane.setEnabledAt(2,false);
                   //textExperyDate.setText("");
              if (obj == btnOSubmit)
                   if (validOrderNo() == false) return;
                   if (validToyId() == false) return;
                   if (chkNullEntry(txtQty, "Quantity")) return ;
                   if (chkNullEntry(txtToyCost, "Toy Cost")) return ;
              if (obj == btnOReset)
                   resetOrder();
              if (obj == btnPSubmit)
                   if (validPShopperId() && validPPassword())
                        tabbedPane.setEnabledAt(2, true);
                        tabbedPane.setEnabledAt(1, false);
                        txtShopperId.setText("");
                        txtPassword.setText("");
                        resetPassword();
                        //tabbedPane.addTab("Order",null,oP,"Order Details");
              if (obj == btnPReset)
                   resetPassword();
                   tabbedPane.setEnabledAt(1, false);
                   tabbedPane.setEnabledAt(2, false);
              if (obj == btnPNew)
                   tabbedPane.setEnabledAt(1, true);
                   tabbedPane.setEnabledAt(2, false);
                   resetPassword();
                   tabbedPane.setSelectedComponent(sP);
                   //tabbedPane.addTab("Shopper",null,sP,"Shopper Details");          
              if (obj == btnPLogoff)
                   tabbedPane.setEnabledAt(2, false);
                   tabbedPane.setEnabledAt(1, false);
                   resetPassword();
         public void focusGained(FocusEvent fe)
              //Object aObj = fe.getSource();
              //showStatus("Current Object is "+aObj);
         public void resetPassword()
              txtShopperId.setText("");
              txtPassword.setText("");
         public void resetShopper()
                   textShopperId.setText("");
                   textPassword.setText("");
                   textFirstName.setText("") ;
                   textLastName.setText("") ;
                   textEmailId.setText("") ;
                   textAddress.setText("") ;
                   textState.setText("") ;
                   textCountryId.setText("") ;
                   textZipCode.setText("") ;
                   textPhone.setText("") ;
                   textCreditCardNo.setText("") ;
         public void resetOrder()
              txtOrderNo.setText("");
              txtToyId.setText("");
              txtQty.setText("") ;
              txtToyCost.setText("") ;
              txtMsg.setText("") ;
         public void focusLost(FocusEvent fe)
              try{
                   Object obj = fe.getSource();
                   if (obj == textShopperId &&     validShopperId() == false)
                        //textShopperId.requestFocus();
                        return;
                   if (obj == textPassword && validPassword() == false)
                        //textPassword.requestFocus();
                        return;
                   if (obj == textFirstName && validFirstName() == false)
                        //textFirstName.requestFocus();
                        return;
                   if (obj == textEmailId && validEmailId() == false)
                        //textEmailId.requestFocus();
                        return;
                   if (obj == txtOrderNo && validOrderNo() == false)
                        //txtOrderNo.requestFocus();
                        return;
                   if (obj == txtToyId && validToyId() == false);
                        //txtToyId.requestFocus();
                        return;
              catch(Exception e)
                   showStatus("error in LostFocus() Method");
         public boolean validShopperId()
              if (chkNullEntry(textShopperId,"Shopper Id")) return false;
              return true;
         public boolean validPassword()
              if (chkNullEntry(textPassword,"Password")) return false;
              return true;
         public boolean validFirstName()
              if (chkNullEntry(textFirstName,"First Name")) return false;
              return true;
         public boolean validLastName()
              if (chkNullEntry(textLastName,"Last Name")) return false;
              return true;
         public boolean validAddress()
              if (chkNullEntry(textAddress,"Address")) return false;
              return true;
         public boolean validState()
              if (chkNullEntry(textState,"State")) return false;
              return true;
         public boolean validCountryId()
              if (chkNullEntry(textCountryId,"Country")) return false;
              return true;
         public boolean validZipCode()
              if (chkNullEntry(textZipCode,"Postal Code")) return false;
              return true;
         public boolean validCreditCardNo()
              if (chkNullEntry(textCreditCardNo,"Credit Card No.")) return false;
              return true;
         public boolean validEmailId()
              if (chkNullEntry(textEmailId,"Email Address")) return false;
              String s1 = textEmailId.getText();
              int abc = s1.indexOf("@");
              if (abc == -1 || abc == 0 || abc == (s1.length()-1))
                   JOptionPane.showMessageDialog(sP,"Invalid Email Address","Error Message",JOptionPane.ERROR_MESSAGE);
                   //textEmailId.requestFocus();
                   return false;
              return true;
         public boolean validOrderNo()
              if (chkNullEntry(txtOrderNo,"Order No.")) return false;
              return true;
         public boolean validToyId()
              if (chkNullEntry(txtToyId,"Toy Id")) return false;
              return true;
         public boolean chkNullEntry(JTextField aObj,String sDef)
              String s1 = aObj.getText();
              if (s1.length() ==0)
                   try
                        JOptionPane.showMessageDialog(sP,sDef+" cannot be left blank","Error Message",JOptionPane.ERROR_MESSAGE);
                        //showStatus(sDef+" cannot be left blank");
                        // nbvvvv vcz     z111111eeeefgggggggggg aObj.requestFocus();
                   catch(Exception e)
                        showStatus("Error in chkNullEntry() method");
                   return true ;
              else
                   return false;
         public boolean validPShopperId()
              if (chkNullEntry(txtShopperId,"Shopper Id")) return false;
              return true;
         public boolean validPPassword()
              if (chkNullEntry(txtPassword,"Password")) return false;
              return true;
    // end of code.

    Would it not be acceptable to check that each field has a value when Submit is pressed. If a field is found with no data then display the error message and return the focus to the empty field. This would solve the multiple cursors problem as you would not need any focusLost handler code.
    If this is entirely out of the question then you will have to override some of the FocusManager methods to prevent the JVM from handling focus for you :
    FocusManager.setCurrentManager(new DefaultFocusManager() {
      // Override FocusManager methods here.
    });Ronny.

  • Listeners and theur problems ?

    Hello
    As a brandnew Linux oracle user i still have a lot of questions
    on the configuration of the listener.ora file and in general
    i was able to get the database up and running on my Suse 5.3 box
    and have some experience with Oracle on AIX..
    My problem at the linux server is thisone :
    TNSLSNR for Linux: Version 8.0.5.0.0 - Production on 10-JAN-99
    19:52:30
    (c) Copyright 1997 Oracle Corporation. All rights reserved.
    System parameter file is
    /oracle/ora805/network/admin/listener.ora
    Log messages written to /oracle/ora805/network/log/listener.log
    Listening on: (ADDRESS=(PROTOCOL=ipc)(DEV=6)(KEY=PW1))
    Listening on: (ADDRESS=(PROTOCOL=ipc)(DEV=10)(KEY=PNPKEY))
    Listening on:
    (ADDRESS=(PROTOCOL=tcp)(DEV=11)(HOST=192.168.3.50)(PORT=1521))
    TIMESTAMP * CONNECT DATA [* PROTOCOL INFO] * EVENT [* SID] *
    RETURN CODE
    TNS-01155: Incorrectly specified SID_LIST_LISTENER parameter in
    LISTENER.ORA
    NL-00303: syntax error in NV string
    The IP SID and Port seem to be ok..
    the argument that SID_LIST_Listener is wrong ? its empty yeah ..?
    I can send the config too, perhaps this is enough for an Oracle
    expert to solve my problem ??
    Peter
    null

    Peter H. Wassink (guest) wrote:
    : Hello
    : As a brandnew Linux oracle user i still have a lot of questions
    : on the configuration of the listener.ora file and in general
    : i was able to get the database up and running on my Suse 5.3
    box
    : and have some experience with Oracle on AIX..
    : My problem at the linux server is thisone :
    : TNSLSNR for Linux: Version 8.0.5.0.0 - Production on 10-JAN-99
    : 19:52:30
    : (c) Copyright 1997 Oracle Corporation. All rights reserved.
    : System parameter file is
    : /oracle/ora805/network/admin/listener.ora
    : Log messages written to /oracle/ora805/network/log/listener.log
    : Listening on: (ADDRESS=(PROTOCOL=ipc)(DEV=6)(KEY=PW1))
    : Listening on: (ADDRESS=(PROTOCOL=ipc)(DEV=10)(KEY=PNPKEY))
    : Listening on:
    : (ADDRESS=(PROTOCOL=tcp)(DEV=11)(HOST=192.168.3.50)(PORT=1521))
    : TIMESTAMP * CONNECT DATA [* PROTOCOL INFO] * EVENT [* SID] *
    : RETURN CODE
    : TNS-01155: Incorrectly specified SID_LIST_LISTENER parameter in
    : LISTENER.ORA
    : NL-00303: syntax error in NV string
    : The IP SID and Port seem to be ok..
    : the argument that SID_LIST_Listener is wrong ? its empty yeah
    : I can send the config too, perhaps this is enough for an Oracle
    : expert to solve my problem ??
    : Peter
    Make sure your GLOBAL_DNAME looks like sid@hostname. In other
    words, if your sid = "foo" and your hostname = "bar", make sure
    this line exists in your SID_LIST_LISTENER section:
    (GLOBAL_DBNAME= foo@bar)
    null

  • Org.flexunit.listeners.UIListener not found, and other problems

    I have a basic setup of FlexUnit that comes with the latest FlashBulider. I import a bunch of SWC's in my project and try to follow instructions from here:
    http://docs.flexunit.org/index.php?title=Setting_up_a_FlexUnit_4_Project
    I got an error saying defintion of UIListener could not be found.
    Then I checked the AS docs here: http://docs.flexunit.org/asdocs/index.html
    And found out there is no UIListener class at all
    So I realized that core.addListener takes IRunListener, and change the code to this:
    core.addListener(IRunListener(uiListener));
    Sadly, when run. there was a runtime error with this line:
    <flexui:TestRunnerBase id="uiListener" width="100%" height="100%" x="0" y="0" />
    Saying TestRunnerBase does not implement the IRunListener intarface,

    The UIListener is not in the core project, it is in the UIListener project, so unless you have that one as well, you will not have the UIListener.
    My guess though is that it is a TestRunnerBase issue. TestRunnerBase isn't something we wrote for FlexUnit 4. It is an adaption of a FlexUnit 1 concept to give people a familiar environment as a default test runner. The goal is to eventually write a new one for FlexUnit 4 but our priorities were features and IDE integration.
    All of that said, I am guessing the flexui namespace in your project is pointing to an older version of the TestRunnerBase buried somewhere in the FlexUnit .9 project. We include FlexUnit .9 in its entirety for compatibility reasons, but it means that you can sometimes reference older classes. The appropriate namespace should be:
    http://www.adobe.com/2009/flexUnitUIRunner
    If that doesn't work, then you are missing the FlexUnit4UIListener.swc and your namespace is probably set differently. Here is another thread on this same issue:
    http://forums.adobe.com/message/2252570#2252570
    When configured correctly, your MXML file should read something like this:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application
    xmlns:mx="http://www.adobe.com/2006/mxml"
    creationComplete="runMe()" xmlns:adobe="http://www.adobe.com/2009/flexUnitUIRunner">
      <mx:Script>
          <![CDATA[
            import org.flexunit.listeners.UIListener;
            import compilationSuite.SuitesToRun;
            import org.flexunit.runner.FlexUnitCore;
            private var core:FlexUnitCore;
            public function runMe():void {
              core = new FlexUnitCore();
              core.addListener( uiListener );
              core.run( compilationSuite.SuitesToRun );
        ]]>
      </mx:Script>
      <adobe:TestRunnerBase id="uiListener" width="100%" height="100%"  />
    </mx:Application>
    I will give the wiki page you reference a read today and see if I can make things clearer,
    Mike

  • Listeners order problem

    Does anybody know WHY the last added listener is notified first? Why it is not opposite? And is there any common approach to deal with situations when order of notifing is important?

    If order of notification is important to your application you should take
    care of it yourself. Here's an OrderedActionListener for example:public class OrderedActionListener implements ActionListener {
       private List<ActionListener> listeners= new ArrayList<ActionListener>();
       public void addActionListener(ActionListener listener) {
          listeners.add(listener);
       public void removeActionListener(ActionListener listener) {
          listeners.remove(listener);
       public void actionPerformed(ActionEvent ae) {
          for (Iterator i= listeners.iterator(); i.hasNext(); }
             i.next().actionPerformed(ae);
    }... register all your ActionListeners to this object and register this
    object to the real event source.
    kind regards,
    Jos

Maybe you are looking for

  • Contacts and Calendar not synching. (Centro, Windows XP, Palm Desktop 6.2.2) Please help!

    I originally posted on the Hotsync forum, and it was suggested that I post my question here.  Important information:  My office uses Microsoft Outlook Exchange, and I have my Centro set up to get my emails.  It also wants to sync my contacts and cale

  • Feature of opening link in new tab when middle-click it has just dissapeared.

    Hello! Feature of opening link in new tab when middle-click it has just dissapeared; now, when I middle-click the link, nothing happens - no new tab, simply nothing! It's not issue with a mouse, I've tried another mouse, and it's the same, and middle

  • Incorrect Images in Email.

    We need to be able to monitor our server room so our cameras snap pictures on movement but the images contained in email app show with incorrect date, time and image? They are correct on everything (Outlook, Blackberry, Android) but the Ipad. For ins

  • How to open Project File?

    Sorry for this I am a newbie, I love the "Fun With" series but I don't know how to open the project files. It comes to my desktop with stuffit expander and then in text edit it looks like a mess. Please advise and thanks!

  • Zen Stone Plus Battery Life Test -Summ

    Battery Life/ Playtime: Up to 9.5 hours for continuous audio playback Battery Type: Rechargeable Li-Ion Polymer (Embedded) *CREATIVE specifications. I had tested on my zen stone plus battery life... I used uni'versal travel adapter for zen micro to f