Adding a listner

I have a problem with an error that says my class should be abstract:
public class KenshinGame2 extends Frame implements WindowListener {
public KenshinGame2 () {
     addWindowListener (this);
setTitle ("Game: Level 1");
     setLocation (frmLoc, 14);
     setSize (760, 740);
     setResizable (false);
     setVisible(true);
public void windowClosing(WindowEvent e){
System.exit (0);
public static void main(String args[]) {
     new KenshinGame2();
But the program does not compile it says that my class should be abstract??

What colbell said is correct, since I'm learning this stuff right now too, I created a working version.
import java.awt.*;
import java.awt.event.*;
public class KenshinGame2 extends Frame implements WindowListener
public KenshinGame2 () {
setTitle ("Game: Level 1");
setLocation (14, 14);
setSize (760, 740);
setResizable (false);
setVisible(true);
addWindowListener (this);
public void windowClosing(WindowEvent e){
System.exit (0);
public void windowOpened(WindowEvent e) {}
public void windowClosed(WindowEvent e) {}
public void windowIconified(WindowEvent e) {}
public void windowDeiconified(WindowEvent e) {}
public void windowActivated(WindowEvent e) {}
public void windowDeactivated(WindowEvent e) {}
public static void main(String args[]) {
new KenshinGame2();
}

Similar Messages

  • Adding listeners  (Web Server 6.0)

    I use the admin consol to add a second listner and it hangs each time without adding the listner. The message is cryptic that one of the parameters is not acceptable.
    I am using the following:
    id - ls2
    ip - the IP address of the machine
    Port - 443
    Servername - ?????? I thought this was the internal machine name

    Hi
    Have done any changes in java parameters. Please check it start-jvm file in https-admserv directory. And tell me got message you are getting after executing "start" script.
    regard
    franktamil

  • Issue implementing PhaseListner in ADF

    Hi Friends,
    By referring the solution to create phaselistner in ADF at how we can create phaselistener...... plz help me I created listner class and added the entry in faces-config.xml. I restrted the weblogic server after modifying the xml. However, it is not working for me. Could someone suggest what I am missing here?
    RequestListner .java
    package com.bmc.crms.listner;
    import javax.faces.event.PhaseEvent;
    import javax.faces.event.PhaseId;
    import javax.faces.event.PhaseListener;
    public class RequestListner implements PhaseListener{
    @SuppressWarnings("compatibility:-6115882569671806271")
    private static final long serialVersionUID = -3616287763993951473L;
    * @param phaseEvent
    public void afterPhase( PhaseEvent phaseEvent) {  
    System.out.println("++++++++ afterPhase ++++++++ " );
    public void beforePhase(PhaseEvent phaseEvent){  
    System.out.println("++++++++ beforePhase ++++++++ " );
    public PhaseId getPhaseId()
    return PhaseId.RESTORE_VIEW;
    faces-config.xml entry:
    <lifecycle>
    <phase-listener>com.bmc.crms.listner.RequestListner</phase-listener>
    </lifecycle>

    After adding the Phase listner I get the following error in the diagnosis file.
    My application has one login page which creates task going thru the authentication which was working fine. I am now trying to implement the Listner through which I want to get the roles for the user.
    After adding the listner something got broken. The login page is taking me to the same page after entering the username /password. I am using JDev 11.1.1.4.0 and weblogic 10.3
    [ERROR] [] [org.apache.myfaces.trinidadinternal.config.GlobalConfiguratorImpl] [tid: [ACTIVE].ExecuteThread: '5' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: afulamba] [ecid: 004cBC2z7Ca3r2k6wzFg6G0007kG000Cil,0:1] [APP: worklistapp] [URI: /integration/worklistapp/faces/home.jspx] [[
    oracle.adf.controller.ControllerException: ADFC-00025: The ADF controller has not been successfully initalized.
         at oracle.adfinternal.controller.util.Utils.createAndLogControllerException(Utils.java:208)
         at oracle.adfinternal.controller.application.AdfcAppInitializer.initialize(AdfcAppInitializer.java:92)
         at oracle.adfinternal.controller.state.ControllerState.<init>(ControllerState.java:166)
         at oracle.adfinternal.controller.state.ControllerState.initializeRequest(ControllerState.java:783)
         at oracle.adfinternal.controller.state.ControllerState.initializeRequest(ControllerState.java:754)
         at oracle.adfinternal.controller.application.AdfcConfigurator.beginRequest(AdfcConfigurator.java:50)
         at org.apache.myfaces.trinidadinternal.config.GlobalConfiguratorImpl._startConfiguratorServiceRequest(GlobalConfiguratorImpl.java:562)
         at org.apache.myfaces.trinidadinternal.config.GlobalConfiguratorImpl.beginRequest(GlobalConfiguratorImpl.java:212)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:155)
         at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:175)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111)
         at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
         at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
         at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:94)
         at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:161)
         at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111)
         at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
         at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
         at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:94)
         at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:161)
         at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:136)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111)
         at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
         at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
         at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:94)
         at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:161)
         at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
         at

  • PrintJobFailed,printJobCompleted,printJobCanceled events are not triggering

    Hi,
    In my application we are printing some data. For that we are adding PrintStatusTracker listner class which impliments PrintJobListener to DocPrintJob.
    Now the problem is... after print is given i am getting only 2 events triggered in PrintJobListener i.,e printDataTransferCompleted, printJobNoMoreEvents even though it is failed to print. But other events like printJobFailed, printJobCompleted, printJobCanceled are not at all triggering.
    Please help me in this.
    Thanks
    Edited by: Bamgaram on Dec 31, 2009 9:12 AM

    Hi Andrew,
    I dont know how to post an SSCCE. if u want code pls find below.
         import javax.print.*;
         import javax.print.event.*;
         import javax.print.attribute.*;
         import java.awt.print.*;
         import java.awt.*;
         import java.awt.geom.*;
         import java.awt.event.*;
         import javax.swing.*;
    import java.io.*;
         public class PrintJob {
         static class MyComponent extends JPanel
         implements Printable {
         Font theFont = new Font("Serif", Font.ITALIC, 48);
         public void paint(Graphics g) {
         super.paint(g);
         String msg = "Hello, Printer";
         g.setFont(theFont);
         FontMetrics fm = g.getFontMetrics();
         // Center line
         int width = getWidth();
         int stringWidth = fm.stringWidth(msg);
         int x = (width - stringWidth)/2;
         int height = getHeight();
         int stringHeight = fm.getHeight();
         int ascent = fm.getAscent();
         int y = (height - stringHeight)/2 + ascent;
         g.drawString(msg, x, y);
         g.drawRect(x, y-ascent, stringWidth, stringHeight);
         public int print(Graphics g, PageFormat pageFormat, int pageIndex) {
         int x = (int)pageFormat.getImageableX();
         int y = (int)pageFormat.getImageableY();
         g.translate(x, y);
         if (pageIndex == 0) {
         paint(g);
         return Printable.PAGE_EXISTS;
         } else {
         return Printable.NO_SUCH_PAGE;
         public static void main(String args[]) throws Exception {
         final JFrame frame = new JFrame("Printing Graphics");
         frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
         Container contentPane = frame.getContentPane();
         final Component printIt = new MyComponent();
         contentPane.add(printIt, BorderLayout.CENTER);
         JButton button = new JButton("Print");
         contentPane.add(button, BorderLayout.SOUTH);
         ActionListener listener = new ActionListener() {
         public void actionPerformed(ActionEvent e) {
         DocFlavor flavor = DocFlavor.SERVICE_FORMATTED.PRINTABLE;
         PrintService printService =
         PrintServiceLookup.lookupDefaultPrintService();
         DocPrintJob job = printService.createPrintJob();
         PrintJobListener pjlistener = new PrintJobAdapter() {
         public void printDataTransferCompleted(PrintJobEvent e) {
         System.out.println("DataTransferCompleted");
         public void printJobCompleted(PrintJobEvent objPJEvent) {
              System.out.println("printJobCompleted");
         public void printJobFailed(PrintJobEvent objPJEvent) {
              System.out.println("Failed");
         public void printJobNoMoreEvents(PrintJobEvent objPJEvent) {
              System.out.println("NoMoreEvents");
         job.addPrintJobListener(pjlistener);
         PrintRequestAttributeSet pras =
         new HashPrintRequestAttributeSet();
         DocAttributeSet das = new HashDocAttributeSet();
         Doc doc = new SimpleDoc(printIt, flavor, das);
         try {
         job.print(doc, pras);
         } catch (PrintException pe) {
         pe.printStackTrace();
         button.addActionListener(listener);
         frame.setSize(350, 250);
         frame.show();
         }

  • Changes to be done in OBIEE 11g with respect to database change

    Hi,
    Our database has been SHIFTED to new system and got new tnsnames details(hostname, service name etc). What changes do i need to do with respect to the new shifted database in obiee 11g application so that I can connect to the database with same repository with out losing my previous data.
    The things I have done:
    1.Copied the new tnsnames file to oracleBI1\network\admin
    2.Created the new DSN with respect to new databse service name.
    Thanks

    Hi raj,
    You are going in the right direction.Are you facing any problem after executing these steps?
    After copying the tns file to the location,instead of creating new DSN name you can associate the old DSN name by editing it and changing the required fields and credentials and test it then your done.
    UPDATED POST
    It is clearly saying that listener is not reading the DB,so go to the DB where it is installed and check if TNS name related to new database is added and the corresponding listerner is added to listner.ora file for the new DB.
    It will locate at DB installed for example c:\oracle\product\10.1.0\Db_1\network\admin\listener.ora
    If needed paste the listner at the BI path where you have pasted your TNS name.
    UPDATED POST-2
    DSN is not reading the DB name that is what the error is saying so that is the reason you are not able to start the services.....create a new DSN and give a try at it.
    Hope helps you.
    Cheers,
    KK
    Edited by: Kranthi.K on Apr 17, 2011 9:51 PM
    Edited by: Kranthi.K on Apr 17, 2011 10:19 PM

  • JTrees Vectors Help

    Can anyone give some advice on how to implement a JTree using a vector and adding tree listner's or a good site to reference. I have scourge many sites trying to find what I am looking for but I can never find an example containing both actions. What I am looking for is a way to nodes such as Titles, Genre,Rating,Cast, Directors, Year..etc. To note this is being used to house movies. However, I want to set it up so a movie may be in multiple nodes. For example, Star Wars II would be in the node Titles, Genre node containing an Action node, Rating node containing a PG-13 node, ...etc. I want to press the leafs (being movies of a particular node) to display in another panel with the Movies details. My biggest hang up seems to stem from the .getUserObject(). How does the Jtree and the information I need in the vector establish the desired connection. Any help would be appreciated.

    did you read
    http://java.sun.com/docs/books/tutorial/uiswing/components/tree.html?
    hth

  • Jbuttons are not visible

    Hi,
    Please Help.
    I have defined a Jpanel which contains some buttons. This panel is initially collapsed and there is an expand button, clicking on which will expand the panel and buttons should be visible.
    Sometimes the buttons are not visible after expanding the panel, or only some of them are visible.
    This problem is not reproducible everytime.
    For expanding and collapsing the Jpanel i am chaging the bound settings of the panel by using function
    setBounds().
    Can someone please help me with this issue?
    Thanks

    My intention was not to annoy anyone by posting my problem at two different forums. Sorry if i did that. I just wanted to get more opinions on this problem.
    The suggestions i received on this one was mainly to use 'Layout Manager'. I tried using that but was running into other issues. If i have to use Layout Manager then i guess i have to change the design of the full window. I cannot use layout manger on just the part of the window which is giving problem (please let me know i am wrong). Also, I am new to Swings and not much familiar with 'Layout Manager'.
    Is there a way to resolve this problem without using layout manager. This is not reproducible. It happens only in production.
    I am pasting my code below -
    I have modified the code as per the suggestions received from the forum to include repaint() and revalidate() methods.
    The part i added is in bold. Please let me know what changes i should do to improve this and resolve the issue.
    public static void main(String[] args) {
              initGUI();          
              frame = new JFrame();          
              frame.getContentPane().add(this);          
              frame.setBackground(LIGHT_BLUE);          
              frame.setTitle("ABC");
              logoImage = imgSPIcon.getImage();
              frame.setIconImage(logoImage);          
              frame.setSize(286,298);
              frame.setResizable(false);          
              frame.setVisible(false);  
                    frame.getContentPane().validate();  
                    frame.validate();     
    private void initGUI() {
              try {          
                   this.setSize(294, 280);
                   this.setBackground(LIGHT_BLUE);
                   this.setName("ABC");
                   getContentPane().setBackground(this.LIGHT_BLUE);
                   getContentPane().setLayout(null);               
                   this.setFocusable(false);
                   //collapse button used for expanding and collapsing the dial panel
                             m_btnCollapse = new JButton();
                             BottamPanel.add(m_btnCollapse);
                             m_btnCollapse.setBounds(163, 0, 112, 21);
                             m_btnCollapse.setIcon(imgExpandDialpad);
                             m_btnCollapse.setBorder(BorderFactory.createCompoundBorder(null, null));
                             m_btnCollapse.setBackground(new java.awt.Color(177, 201, 224));
                             m_btnCollapse.setContentAreaFilled(false);
                   //Dial panel
                        DialPanel = new JPanel();                    
                        //getContentPane().add(DialPanel);                    
                        DialPanel.setBounds(0, 251, 280, 0);                    
                        DialPanel.setLayout(null);
                        DialPanel.setBackground(bkColor);                    
                             m_btn1 = new JButton();                         
                             m_btn1.setIcon(imgDPOne);
                             m_btn1.setContentAreaFilled(false);
                             m_btn1.setBounds(79, 0, 35, 28);
                             m_btn1.setBorderPainted(false);
                             DialPanel.add(m_btn1);
                             m_btn2 = new JButton();                         
                             m_btn2.setBounds(120, 0, 35, 28);
                             m_btn2.setIcon(imgDPTwo);
                             m_btn2.setContentAreaFilled(false);
                             m_btn2.setBorderPainted(false);
                             DialPanel.add(m_btn2);
                             m_btn3 = new JButton();                         
                             m_btn3.setBounds(161, 0, 35, 28);
                             m_btn3.setIcon(imgDPThree);
                             m_btn3.setContentAreaFilled(false);
                             m_btn3.setBorderPainted(false);
                             DialPanel.add(m_btn3);
                        //includes more such buttons
                                    DialPanel.validate();
                        getContentPane().add(DialPanel);               
                   //adding mouse listner for the collapse button
                   JavaPhoneMouse aJavaPhoneMouse = new JavaPhoneMouse();
                   m_btnCollapse.addMouseListener(aJavaPhoneMouse);
         //mouse listner.
         class JavaPhoneMouse extends java.awt.event.MouseAdapter {
              public void mouseClicked(java.awt.event.MouseEvent event) {
                   Object object = event.getSource();
                   if (object == m_btnCollapse)
                        m_btnCollapse_MouseClicked(event);
         //On expanding the dial panel the dial panel is expanded(the size changes) but the buttons are invisible. 
         void m_btnCollapse_MouseClicked(java.awt.event.MouseEvent event) {
              //if the dial pad is in expanded form it will collapse else it will be expanded.
              if (isDialPadCollapsed == false) {               
                   DialPanel.setBounds(0, 251, 280, 0);
                   DialPanel.revalidate();
                   DialPanel.repaint();                              
                   BottamPanel.setBounds(0, 251, 280, 21);
                   m_btnCollapse.setIcon(imgExpandDialpad);               
                   this.setSize(280, 277);               
                   frame.setResizable(true);
                   frame.setSize(286, 298);
                   frame.setResizable(false);
                            frame.getContentPane().repaint();
                   frame.repaint();                              
                   isDialPadCollapsed = true;
              } else {               
                   this.setSize(280, 408);               
                   frame.setResizable(true);
                   frame.setSize(286, 430);
                   frame.setResizable(false);               
                   BottamPanel.setBounds(0, 384, 280, 21);               
                   DialPanel.setBounds(0, 251, 280, 133);     
                            DialPanel.revalidate();
                   DialPanel.repaint();
                   frame.getContentPane().repaint();
                   frame.repaint();          
                   m_btnCollapse.setIcon(imgCollDialpad);
                   isDialPadCollapsed = false;
    {code}
    Thanks                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • I need help adding a mouse motion listner to my game. PLEASE i need it for

    I need help adding a mouse motion listner to my game. PLEASE i need it for a grade.
    i have a basic game that shoots target how can use the motion listner so that paint objects (the aim) move with the mouse.
    i am able to shoot targets but it jus clicks to them ive been using this:
    public void mouse() {
    dotX = mouseX;
    dotY = mouseY;
    int d = Math.abs(dotX - (targetX + 60/2)) + Math.abs(dotY - (targetY + 60/2));
    if(d < 15) {
    score++;
    s1 = "" + score;
    else {
    score--;
    s1 = "" + score;
    and here's my cross hairs used for aiming
    //lines
    page.setStroke(new BasicStroke(1));
    page.setColor(Color.green);
    page.drawLine(dotX-10,dotY,dotX+10,dotY);
    page.drawLine(dotX,dotY-10,dotX,dotY+10);
    //cricle
    page.setColor(new Color(0,168,0,100));
    page.fillOval(dotX-10,dotY-10,20,20);
    please can some1 help me

    please can some1 help meNot when you triple post a question:
    http://forum.java.sun.com/thread.jspa?threadID=5244281
    http://forum.java.sun.com/thread.jspa?threadID=5244277

  • Adding a progress loader to a dynamic text field / scrollPane

    I have a dynamic text field which is loading images from an external html.  This text is named scrollPaneImage and is a child of a movieClip called scrollPaneContent.  I then load scrollPaneContent into a scroll pane named scrollPane
    When the user interacts with my swf different images are loaded into scrollPaneImage.  Since some of the images take a few seconds to load, I'd like there to be a progress loader displayed in the scrollpane.
    I have tried adding the progress event listner to the dynamic text, the movie clip and the scrollpane and cannot get it to respond or track the loading.
    scrollPaneContent.addEventListener(ProgressEvent.PROGRESS,reportProgress);
    function reportProgress(e:ProgressEvent):void {
        trace(e.bytesLoaded + " loaded out of " + e.bytesTotal);
         trace("LOADED");
    Can anyone suggest what I might be doing wrong or of another approach?
    thanks in advance,
    Josh

    Hi KGLAD.  Thanks for the response.  Yes my code is a little messy.  Here I have included everything and tried to do a little cleaning.  Is there enough code here for you to get an idea of how/when things are firing?
    import com.google.maps.LatLng;
    import com.google.maps.Map;
    import com.google.maps.MapEvent;
    import com.google.maps.MapType;
    import com.distriqt.gmaps.kml.utils.*;
    import com.greensock.*;
    import com.greensock.easing.*;
    import com.greensock.TweenLite;
    import flash.geom.Point;
    import com.greensock.plugins.*;
    TweenPlugin.activate([AutoAlphaPlugin]);
    import com.google.maps.controls.NavigationControl;
    import com.google.maps.controls.MapTypeControl;
    import com.google.maps.controls.OverviewMapControl;
    import com.google.maps.overlays.GroundOverlay;
    import com.google.maps.overlays.GroundOverlayOptions;
    import com.google.maps.LatLng;
    import com.google.maps.LatLngBounds;
    import com.google.maps.MapMouseEvent;
    import com.google.maps.controls.*;
    import com.google.maps.overlays.Marker;
    import com.google.maps.InfoWindowOptions;
    import com.google.maps.overlays.MarkerOptions;
    import com.anttikupila.utils.JPGSizeExtractor;
    import flash.display.StageAlign;
    import flash.display.StageScaleMode;
    import flash.events.Event;
    import flash.net.URLLoader;
    import fl.controls.UIScrollBar;
    import flash.events.Event;
    import fl.events.ScrollEvent;
    import flash.sampler.NewObjectSample;
    [Embed(source="ICONS/PHOTO_BLACK.png")]var photoIcon:Class;
    [Embed(source="ICONS/BLOG_BLACK.png")]var blogIcon:Class;
    scrollPane
    // GMAP PARAMETERS
    var map:Map = new Map();
    map.key = "map key";
    //map.key = "api key";
    //define the size of the map extent....
    map.sensor = "false";
    map.setSize(new Point(stage.stageWidth, stage.stageHeight));
    map.addEventListener(MapEvent.MAP_READY, onMapReady);
    map.addEventListener(MapEvent.MAP_READY, createmarkers);
    map.addEventListener(MapEvent.MAP_READY, createMarkerArrays);
    map.addEventListener(MapEvent.MAP_READY, createPhotoPingers);
    this.addChild(map);
    map.setSize(new Point(stage.stageWidth, stage.stageHeight));
    //on map ready params
    function onMapReady(event:Event):void
    map.setCenter(new LatLng(48,-113.5), 8, MapType.PHYSICAL_MAP_TYPE);
    map.enableScrollWheelZoom();
    map.disableContinuousZoom();
    //Marker options for a photo piece
    var photoMarkerOptions:MarkerOptions = new MarkerOptions();
    photoMarkerOptions.icon = new photoIcon();
    photoMarkerOptions.hasShadow=false;
    //Marker options for a blog piece
    var blogMarkerOptions:MarkerOptions = new MarkerOptions();
    blogMarkerOptions.icon = new photoIcon();
    blogMarkerOptions.hasShadow=false;
    //load xml tester
    var pntloader:URLLoader = new URLLoader();
    var pntxml:XML = new XML();
    pntloader.addEventListener(Event.COMPLETE, loadpntXML);
    pntloader.load(new URLRequest("map_feed.xml"));
    // create an array of jpgs to index
    var JPGIndexArray:Array = new Array();
    //Create array that will be populated with points
    var pointsArray:Array = new Array();
    //Load the XML
    function loadpntXML(e:Event):void {
        pntxml=new XML(e.target.data);
        pntxml.ignoreWhite = true;
         for (var i:int = 0; i< pntxml.row.length(); i++){
         pointsArray[i]="mrk"+i;
         JPGIndexArray[i]="JPG"+i;
         //trace(pntxml);
    //Create the markers and add them to the map
    function createmarkers(event:Event):void
         for (var i:Number = 0; i < pntxml.row.length(); i++) {
         var markerOptions:MarkerOptions = new MarkerOptions();
          if (pntxml.row[i].TYPE=="PHOTO")
               markerOptions.icon = new photoIcon();
               markerOptions.tooltip = "Photo";
               markerOptions.hasShadow=false;
          else if(pntxml.row[i].TYPE=="BLOG")
               markerOptions.icon = new blogIcon();
               markerOptions.tooltip = "Blog Entry";
               markerOptions.hasShadow=false;
          else
               null     
          pointsArray[i] = new Marker(new LatLng(pntxml.row[i].LAT,pntxml.row[i].LONG),markerOptions);
         markerA.push(pointsArray[i]);
          map.addOverlay(pointsArray[i]);
          pointsArray[i].addEventListener(MapMouseEvent.CLICK,indexCalledMarkerRecord);
          pointsArray[i].addEventListener(MapMouseEvent.CLICK,scrollPanePopulate);
    // PING PHOTO DIMENSIONS BEFORE LOADING //
    var je : JPGSizeExtractor = new JPGSizeExtractor( );
    je.addEventListener( JPGSizeExtractor.PARSE_COMPLETE, jeLoadHandler );
    je.addEventListener( JPGSizeExtractor.PARSE_FAILED, jeParseFailed );
    function createPhotoPingers(event:Event):void{
         for (var k:Number=0; k <pntxml.row.length(); k++){
         JPGIndexArray[k]=new JPGSizeExtractor();
         JPGIndexArray[k].debug = false;
         JPGIndexArray[k].addEventListener(JPGSizeExtractor.PARSE_COMPLETE, jeLoadHandler );
         trace("madeit");
         pingPhotoUrls();
    function pingPhotoUrls():void
         for (var i:Number = 0; i < pntxml.row.length(); i++) {     
          var calledMarkerUrl=pntxml.row[i].URL_OF_CONTENT;
          JPGIndexArray[i].extractSize(calledMarkerUrl);     
    var JPG1=null;
    function jeLoadHandler(e:Event) : void {
         trace(e.currentTarget.width + "x" + e.currentTarget.height );
         imageWidths.push(e.currentTarget.width);
    function jeParseFailed( event : Event ) : void {
         trace( "Parse failed" );
    var imageWidths = new Array;
    // FUNCTIONS FOR INDEXING CALLED MARKERS//
    //Create blank array for use in indexing
    var markerA:Array=[];
    //VAR FOR USE IN INDEXING CALLED MARKER
    var pointindex=null;
    //INDEX CALLED MARKER POINT XML RECORD
    function indexCalledMarkerRecord(e:MapMouseEvent):void{
         pointindex=genIndexPos(markerA,Marker(e.currentTarget));
         //trace(pntxml.row[pointindex].DESC);
    //FUNCTION FOR INDEXING CALLED MARKER
    function genIndexPos(a:Array,e:Marker):uint{
         for(var i:uint=0;i<a.length;i++){
              if(a[i]==e){
                   return i;               
                   return null;
    //           SCROLLPANE FUNCTIONS              //
    this.addChild(scrollPane);
    scrollPane.setSize(255,300);
    scrollPane.x=-200;
    scrollPane.y=-200;
    scrollPane.alpha=0;
    scrollPaneContent.mouseEnabled=false;
    spHeader.closeBox.addEventListener(MouseEvent.CLICK, function(eMouseEvent):void
                                                                TweenLite.to(scrollPane, .5,{autoAlpha:0,overwrite:true});                                                            
    spHeader.forDrag.addEventListener(MouseEvent.MOUSE_DOWN, function (e:MouseEvent):void
              scrollPane.startDrag();          
    spHeader.forDrag.addEventListener(MouseEvent.MOUSE_UP, function (e:MouseEvent):void
              scrollPane.stopDrag();
    spHeader.forDrag.buttonMode=true;
    spHeader.forDrag.useHandCursor=true;
    spHeader.width=300;
    scrollPane.source = scrollPaneContent;
    scrollPaneContent.scrollPaneText.autoSize='left';
    scrollPaneContent.scrollPaneImage.autoSize='center';
    scrollPaneContent.scrollPaneImage.autoSize=TextFieldAutoSize.CENTER;
    scrollPaneContent.mouseEnabled=false;
    scrollPaneContent.scrollPaneText.condenseWhite = true;
    // Add listener.
    scrollPane.addEventListener(Event.COMPLETE, completeListener);
    scrollPaneContent.addEventListener(ProgressEvent.PROGRESS,reportProgress);
    function completeListener(event:Event):void {
    trace('Scrollpane content loaded');
    function reportProgress(e:ProgressEvent):void {
        trace(e.bytesLoaded + " loaded out of " + e.bytesTotal);
        trace("LOADED");
    function scrollPanePopulate(event:Event){     
         //show scroll pane
         scrollPane.x=33;
         scrollPane.y=33;
         TweenLite.to(scrollPane, .5,{autoAlpha:1,overwrite:true});
         TweenLite.to(spHeader, .5,{autoAlpha:1,overwrite:true});
         //create the temp variables
         var calledMarkerIndex=pntxml.row[pointindex].ID;
         var calledMarkerDate=pntxml.row[pointindex].DATE;
         var calledMarkerDescription=pntxml.row[pointindex].DESC;
         var calledMarkerContent=pntxml.row[pointindex].URL_OF_CONTENT;     
         var imgWidth=JPGIndexArray[pointindex].width;
         var imgHeight=JPGIndexArray[pointindex].height;
         scrollPaneContent.scrollPaneText.htmlText="<font size='12' color='#000000'>"+calledMarkerDescription;
         var imgBoxHeight=scrollPaneContent.scrollPaneImage.height;
        var txtHeight=scrollPaneContent.scrollPaneText.height;
        var contentHeight=(imgBoxHeight+txtHeight);
        scrollPane.setSize(300,(contentHeight+15));     
         //size the text box
         scrollPaneContent.scrollPaneText.width=270;
         //if image is wide or tall, scale accordingly and create a string that will be used
         if(imgWidth>=imgHeight){          
              var imgSource:String = "<img src="+"'"+calledMarkerContent+"'"+"width='"+250+"'"+"height='"+150+"'"+"/>";                    
              var calledImgHgh=160;          
         else
              var imgSource:String = "<img src="+"'"+calledMarkerContent+"'"+"width='"+110+"'"+"height='"+167+"'"+"/>";          
              var calledImgHgh=177;          
         //fill in the text
         scrollPaneContent.scrollPaneImage.htmlText=imgSource;
         //scrollPaneContent.scrollPaneText.htmlText="<font size='12' color='#000000'>"+calledMarkerDescription;     
         //pan the map to the called position
         map.panTo(pointsArray[calledMarkerIndex-1].getLatLng())
         //add the header to the SP and scale accordingly
         scrollPane.addChild(spHeader);
         spHeader.x=-1;
         spHeader.y=1;
         spHeader.width=299;
         if (txtHeight>=250){          
              scrollPane.setSize(300,275);          
              scrollPaneContent.scrollPaneText.htmlText="<font size='12' color='#000000'>"+calledMarkerDescription+"<br><br>";
         if (txtHeight<=5){
              scrollPane.setSize(300,200);
              scrollPaneContent.scrollPaneText.htmlText="<font size='12' color='#000000'>"+calledMarkerDescription;
         if (txtHeight>=5){
              scrollPane.setSize(300,275);
              scrollPaneContent.scrollPaneText.htmlText="<font size='12' color='#000000'>"+calledMarkerDescription+"<br><br>";
         // CREATE TEMP VARIABLES FOR POSITIONING AND PLACE DYNAMIC TEXT
         var scTextY=scrollPaneContent.scrollPaneText.y;
         var scImageY=scrollPaneContent.scrollPaneImage.y;
         var scTextHeight=scrollPaneContent.scrollPaneText.height;
         scrollPaneContent.scrollPaneText.y=scImageY+calledImgHgh;
         //update the scrollpane and reset the scrollbar
         scrollPane.update();
         scrollPane.verticalScrollPosition=(0);
         scrollPane.verticalScrollBar.height=270;
         scrollPane.verticalScrollBar.x=281;
         scrollPane.verticalScrollBar.y=3;
    spHeader.alpha=0;
    this.addChild(spHeader);
    var photoMarkersArray=new Array();
    var photoMarkersIndexArray=new Array();
    //CREATE ARRAY OF PHOTO MARKERS
    function createMarkerArrays(e:Event):void{
    for (var j:int=0; j<pntxml.row.(TYPE=="PHOTO").ID.length(); j++){
              var tempMarkerIndex=pntxml.row.(TYPE=="PHOTO").ID[j];
              var tempMarkerRef="mrk"+tempMarkerIndex;
              photoMarkersArray.push(tempMarkerRef);
              photoMarkersIndexArray.push(tempMarkerIndex);

  • 11gR2 listner

    Hi,
    I have standalone 11gR2 database on AIX, after I installed I created a database called NONRAC using dbca and then I dropped that database then created another database called NEWDB. Now I tried to create listner using netca, the database is not registered in the listener. then I deleted the listner using netca and then added listener using
    srvctl add listener -l LISTENER -p TCP:1521 -o /ora01/app/oracle/product/11.2.0.2 and stared it using srvctl start listener -l LISTENER. But when I do lsnrctl, I see the databse NONRAC is registed and not NEWDB, I verified the ORACLE_HOME, ORACLE_SID environment variables and they are all set right. Anyone know from where it is getting the database NONRAC and why the NEWDB is not registered within the listener? I tried alter system register as well and I didn't work.
    Thanks

    Oracle version is 11.2.0.2 and here is the lsnrctl output
    LSNRCTL for IBM/AIX RISC System/6000: Version 11.2.0.2.0 - Production on 09-NOV-2011 09:18:04
    Copyright (c) 1991, 2010, Oracle. All rights reserved.
    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=avvpdb01)(PORT=1521)))
    STATUS of the LISTENER
    Alias LISTENER
    Version TNSLSNR for IBM/AIX RISC System/6000: Version 11.2.0.2.0 - Production
    Start Date 09-NOV-2011 09:17:12
    Uptime 0 days 0 hr. 0 min. 52 sec
    Trace Level off
    Security ON: Local OS Authentication
    SNMP ON
    Listener Parameter File /ora01/grid/network/admin/listener.ora
    Listener Log File /ora01/grid/log/diag/tnslsnr/avvpdb01/listener/alert/log.xml
    Listening Endpoints Summary...
    (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER)))
    (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.27.51.121)(PORT=1521)))
    Services Summary...
    Service "+ASM" has 1 instance(s).
    Instance "+ASM", status READY, has 1 handler(s) for this service...
    The command completed successfully
    Edited by: Rock2 on Nov 9, 2011 9:18 AM

  • Listner is not starting

    Hi
    I get error as
    ORA-12514: TNS:listener doesnot currecntly know of service requested in connect discptritor
    I checked on server listner is up as
    LSNRCTL> status
    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=dummy2069)(PORT=1521)))
    STATUS of the LISTENER
    Alias LISTENER
    Version TNSLSNR for 64-bit Windows: Version 10.2.0.1.0 - Production
    Start Date 17-NOV-2006 17:35:35
    Uptime 0 days 0 hr. 6 min. 4 sec
    Trace Level off
    Security ON: Local OS Authentication
    SNMP OFF
    Listener Parameter File C:\oracle\product\10.2.0\db_1\NETWORK\ADMIN\listener.ora
    Listener Log File C:\oracle\product\10.2.0\db_1\network\log\listener.log
    Listening Endpoints Summary...
    (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=dummy2069)(PORT=1521)))
    (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC0ipc)))
    Services Summary...
    Service "ORCL2069." has 1 instance(s).
    Instance "orcl2069", status READY, has 1 handler(s) for this service...
    Service "ORCL2069." has 1 instance(s).
    Instance "orcl2069", status READY, has 1 handler(s) for this service...
    Service "ORCL2069XDB." has 1 instance(s).
    Instance "orcl2069", status READY, has 1 handler(s) for this service...
    Service "ORCL2069_XPT." has 1 instance(s).
    Instance "orcl2069", status READY, has 1 handler(s) for this service...
    Service "PLSExtProc" has 1 instance(s).
    Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
    Service "test123" has 1 instance(s).
    Instance "test123", status READY, has 1 handler(s) for this service...
    Service "test123XDB" has 1 instance(s).
    Instance "test123", status READY, has 1 handler(s) for this service...
    Service "test123_XPT" has 1 instance(s).
    Instance "test123", status READY, has 1 handler(s) for this service...
    The command completed successfully
    My tns entry is also correct
    as
    ORCL2069 =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.122)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = ORCL2069)
    how to resolve it ?

    Had a similar problem then added the following:
    (SERVICE_NAME = ORCL2069.your domain)
    SQL> show parameter db_domain
    $ lsnrctl reload
    $ tnsping ORCL2069.domain
    Cheers
    Justin Miles

  • Key Listner Clearification

    Hi,
    To react on key events i added key binders.Like if the button has focus on it and if user presses Enter it must react to that.
    i added the following code :
    addRowButton.getInputMap().put(javax.swing.KeyStroke.getKeyStroke("ENTER"),"pressed");
            addRowButton.getActionMap().put("pressed",new AbstractAction(){
                 public void actionPerformed(ActionEvent evt) {
                      addRowButtonActionPerformed(evt);
            addRowButton.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    addRowButtonActionPerformed(evt);
            });So if i want to react to both key pressed event and on mouse click........
    do i have to follow same thing or is there any other way to do it.
    because when i removed the action listner then its no longer react to the event clicked
    and if i remove the binding then it will not reacts on key event
    so is there any way to club this thing togather.
    or is there any better way to do it

    Check out the [Enter Key and Button|http://www.camick.com/java/blog.html?name=enter-key-and-button] suggestions.

  • TNS: no Listner TNS 12541 when i tnsping orcl

    i used tnsping orcl
    i get TNS: no Listner TNS 12541
    bala

    Don't know which platform you are running this, but assume from the path that it is some flavour of UNIX.
    Try the following:
    ps -ef |grep lsn
    If there are any listeners running, then you will get output along the lines of:
    oracle 25562 1 0 Feb 14 ? 1227:32 /oracle/product/10.2/bin/tnssnr listener_10_2 -inherit
    oracle 25555 1 0 Feb 14 ? 0:05 /oracle/product/10g/bin/tnslsnr listener_10g -inherit
    If there are appropriate listeners running, check whether there is a listener entry for the database you are interested in, by running oraenv to set to a database using the correct version of oracle and then run:
    lsnrctl status <listener_name>
    If the listener is just called LISTENER you can omit the name.
    If the database you are interested in is not represented, then it needs to be added.
    If there are no listeners running - check the listener config, to see if it has a name other than the default:
    run oraenv to set to a database using the correct version of oracle
    cd $ORACLE_HOME/network/listener
    vi listener.ora.
    Check the name of the listener and whether the database you are interested in is included in the file (unless you use the local listener parameter or the default port 1521)
    try to start the listener by running
    lsnrctl start <listener_name>

  • Listner and Host configuration

    Hi,
    I installed oracle 11g, after many attempts I succeed to access to oracle web interface.
    In the home page of the db I found:
    >
    Host          192.168.223.128
    Listener          LISTENER_192.168.223.128
    But the computer IP is 192.168.132.128.
    If I click on listner I found:
    >
    Agent not reachable
    If I click on modify oracle asks me authentication but when I insert user and password (user sysman) I receive this error:
    Convalidation error
    There is an internal error.How can I modify the host ip and the listner?
    I changed the file C:\app\Administrator\product\11.1.0\db_1\NETWORK\ADMIN\tnsnames.ora and I have changed HOST in WS2003 from 192.168.223.128 to 192.168.132.128.
    How can I solve?
    Thanks, bye bey.

    Hi,
    I added this line to my file hosts:
    127.0.0.1 192.168.132.128
    When I open the web interface of the db and I click on listner I continue to have the same problems with agent and listener not reacheable.
    >
    Oracle home destination
    Name     Alert availability     Type
    192.168.223.128:3938     Not available          Agent
    ws2003.server     Not available          Database instance
    LISTENER_192.168.223.128     Not available          Listener
    Before opening the web interface I relaunched the listener configuration.
    Whad do I have to do?
    Thanks, bye bye.

  • Error while adding A/P Credit Memo!

    Error while adding A/P Credit Memo..........
    'G/L Accounts' (OACT) (ODBC-2028) Message - 131-183
    Please advice me .....
    Thanks...

    Hi
    Check this thread this may help you.
    [Re: AP Invoice - No Matching Account Error]
    Regards
    Balaji

Maybe you are looking for