Repaint() method is not working in MAC IE

Hi All
why repaint method is not working in MAC IE ? What i am doing is in one class which is inheriting Canvas class getting the keybord input then adding it to main applet.
Please help me i am trying it for whole week and i couldn't find any solution. I didn't put my code but if anyone is willing to help me i can post it.
Thanks in advancs
Shan

Hi
Thanks for your reply. Actually i wrote simple applets and those are working well.
So i did debug the code and i found that when i am running the following code in Apple MAC IE, nothing is happening in handleEvent method. Especially it is not going into the if statement (if (evt.id==401)). here i am checking for KEY_PRESS. I also tried with keyDown method but same problem in MAC IE.
I am pasting the code that is giving me problem.
import java.awt.*;
import java.applet.*;
public class testApplet extends Applet
public void init()
setLayout(new BorderLayout());
editableArea = new EditableArea();
editableArea.setBackground(Color.yellow);
add("Center", editableArea);
EditableArea editableArea;
import java.awt.*;
public class EditableArea extends Canvas
String s = "";
public boolean handleEvent(Event evt)
if (evt.id==401)
if(evt.key >= 32 && evt.key <= 255)
char c = (char)evt.key;
s = s + c;
repaint();
return super.handleEvent(evt);
public void paint( Graphics g )
g.setColor(Color.blue);
g.drawString( s,5,15);
--------------------------------------------------------------------

Similar Messages

  • Repaint() method 's not work but paint(getGraphics()) does, why?

    I've just read the following code ( in the Core Java 2 advance features vol 2 book):
      import java.awt.*;
      import java.awt.event.*;
       import java.awt.geom.*;
       import java.util.*;
       import javax.swing.*;
          Shows an animated bouncing ball.
      public class Bounce
         public static void main(String[] args)
            JFrame frame = new BounceFrame();
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            frame.show();
         The frame with canvas and buttons.
      class BounceFrame extends JFrame
            Constructs the frame with the canvas for showing the
            bouncing ball and Start and Close buttons
         public BounceFrame()
            setSize(WIDTH, HEIGHT);
            setTitle("Bounce");
            Container contentPane = getContentPane();
            canvas = new BallCanvas();
            contentPane.add(canvas, BorderLayout.CENTER);
            JPanel buttonPanel = new JPanel();
            addButton(buttonPanel, "Start",
               new ActionListener()
                     public void actionPerformed(ActionEvent evt)
                        addBall();
            addButton(buttonPanel, "Close",
               new ActionListener()
                     public void actionPerformed(ActionEvent evt)
                       System.exit(0);
            contentPane.add(buttonPanel, BorderLayout.SOUTH);
            Adds a button to a container.
            @param c the container
            @param title the button title
            @param listener the action listener for the button
         public void addButton(Container c, String title,
            ActionListener listener)
            JButton button = new JButton(title);
            c.add(button);
            button.addActionListener(listener);
            Adds a bouncing ball to the canvas and makes
            it bounce 1,000 times.
         public void addBall()
            try
               Ball b = new Ball(canvas);
               canvas.add(b);
               for (int i = 1; i <= 1000; i++)
                  b.move();
                  Thread.sleep(5);
            catch (InterruptedException exception)
         private BallCanvas canvas;
         public static final int WIDTH = 450;
         public static final int HEIGHT = 350;
        The canvas that draws the balls.
    class BallCanvas extends JPanel
            Add a ball to the canvas.
            @param b the ball to add
       public void add(Ball b)
           balls.add(b);
        public void update(Graphics g) {
             super.update(g);
             System.out.println("Test");
        public void paintComponent(Graphics g)
          super.paintComponent(g);
          Graphics2D g2 = (Graphics2D)g;
          for (int i = 0; i < balls.size(); i++)
             Ball b = (Ball)balls.get(i);
             b.draw(g2);
            // System.out.println("Test");
        private ArrayList balls = new ArrayList();
        A ball that moves and bounces off the edges of a
       component
    class Ball
            Constructs a ball in the upper left corner
            @c the component in which the ball bounces
        public Ball(Component c) { canvas = c; }
           Draws the ball at its current position
           @param g2 the graphics context
        public void draw(Graphics2D g2)
           g2.fill(new Ellipse2D.Double(x, y, XSIZE, YSIZE));
          Moves the ball to the next position, reversing direction
          if it hits one of the edges
       public void move()
          x += dx;
          y += dy;
           if (x < 0)
              x = 0;
              dx = -dx;
         if (x + XSIZE >= canvas.getWidth())
             x = canvas.getWidth() - XSIZE;
              dx = -dx;
           if (y < 0)
             y = 0;
              dy = -dy;
           if (y + YSIZE >= canvas.getHeight())
              y = canvas.getHeight() - YSIZE;
              dy = -dy;
           //canvas.paint(canvas.getGraphics());//this would OK.
           canvas.repaint();//This not work, please tell me why?
        private Component canvas;
        private static final int XSIZE = 15;
       private static final int YSIZE = 15;
       private int x = 0;
       private int y = 0;
       private int dx = 2;
       private int dy = 2;
    }this program create a GUI containing a "add ball" button to creat a ball and make it bounce inside the window. ( this seems to be stupid example but it is just an example of why we should use Thread for the purpose ).
    Note: in the move() method, if i use canvas.repaint() then the ball is not redrawn after each movement. but if i use canvas.paint(canvas.getGraphics()) then everythings seem to be OK.
    Another question: Still the above programe, but If I create the ball and let it bounce in a separate thread, then canvas.repaint() in the move method work OK.
    Any one can tell me why? Thanks alot !!!

    I don't know why the one method works. Based on my Swing knowledge neither method should work. Did you notice that the JButton wasn't repainted until after the ball stopped bouncing. That is because of the following code:
    for (int i = 1; i <= 1000; i++)
        b.move();
        Thread.sleep(5);
    }This code is attempting to move the ball and then sleep for 5 milliseconds. The problem with this code is that you are telling the Event Thread to sleep. Normally painting events are added to the end of the Event Thread to allow for multiple painting requests to be combined into one for painting efficiency. When you tell the Thread to sleep then the GUI doesn't get a chance to repaint itself.
    More details about the EventThread can be found in the Swing tutorial:
    http://java.sun.com/docs/books/tutorial/uiswing/misc/threads.html
    This explains why the button isn't repainted, but it doesn't explain why the ball bounces. I don't know the answer to this for sure, but I do know that there is a method called paintImmediately(...) which causes the painting to be performed immediately without being added to the end of the Event Thread. This means the painting can be done before the Thread sleeps. Maybe the canvas.paint(....) is somehow invoking this method.
    When you click on the button this code is executed in the EvWell in Swing, all GUI painting is done on the Event Thread

  • My own built fullscreen mode flv player is not working in Mac OS

    I built a flv player, it is just a normal video player with a
    fullscreen mode.
    The video player is work fine in Window IE, FF, and Safari.
    But not not working in Mac OS X, leopard & tiger &
    May I know what might cause this problem?
    I m usng action script 3, flash cs3 & all my browsers
    already upgrade to latest version of Flash Player.
    Help!!!

    I am running Mac OS X 10.10.1 Yosemite and iPhoto Version 9.6 (910.29). Automatic updates in the Mac App Store is turned on for my iMac and it shows no updates available. I was told directly by Apple Support on the date that I wrote this article (Nov 8, 2014) that there were no Canon drivers and photo transfer software that worked with Yosemite. I was told by Canon that the workaround was to change the communication method from Normal to PTP on the camera, which did provide a solution. At that time I was running Mac OS X 10.10 (because the 10.10.1 update was not yet available) and the most up-to-date version of iPhoto for Mac OS X 10.10 that was available at that time, at least per the Mac App Store. I was told by Canon that the workaround was to change the communication method from Normal to PTP on the camera, which did provide a solution.
    With the Mac OS X 10.10.1 update if the camera is in PTP communications mode the thumbnails now appear in the Import screen in iPhoto almost immediately. If the camera is returned to Normal communications mode; however, it takes forever for the thumbnails to appear. I have been waiting 10 minutes and iPhoto has generated only 14 thumbnails. So it appears that there is still something not working properly between the original Canon EOS Digital Rebel and Mac OS X Yosemite 10.10.1 when the communications mode on the camera is set to Normal.

  • Draw method is not working

    Why the drawLine() is working only inside the paint method??
    BufferedImage image = new BufferedImage(800,500,BufferedImage.TYPE_INT_ARGB);
         Graphics2D g = (Graphics2D)image.getGraphics();
    public void paint(Graphics g)
                   g.setColor(Color.black);
                             //Here, the drawLine() method works
                   g.drawLine(50,0,50,150);
    public void paintX(Graphics g,Point c)
                        //Here, the drawLine() method does not work
                        g.setColor(Color.black);
                   g.drawLine(0-e,0-e,50-e,50-e);
                   g.drawLine(0-e,50-e,50-e,0-e);
                   repaint();
         }

    er, unless you're using JDK 1.5 and it introduces methods I know nothing about, as far as I know
    public void paintX(..) is not a AWT or Swing method. Thus it will never be invoked unless you call it.

  • IMessage and FaceTime not working on Mac Pro and message stating to contact Support came on

    iMessage and FaceTime not working on Mac Pro and a message stating to contact Support came on with a verification code.  It was working on 8/29 but stopped on 8/30.  When I called support to even speak with anyone they wanted $19.  I don't want to pay $19 for an Apple problem.  I cleared my key chain, also reset my apple ID password but still not working.  Works fine on my iPhone.

    There is no official public documentation of that error message as far as I know, but according to reports, it can mean (at least sometimes) that the same Apple ID is being used with the iTunes Store or one of the other Apple content stores, and the payment method is invalid. Sign in to the store and review your account. You do not, of course, have to provide any billing information to set up an account to use only with iMessage, as it's a free service.
    Otherwise, do what the error message tells you to do. According to reports, you won't be charged for the call if you select "Apple ID" as the product you need support for, and cite the customer code in the alert as the "validation code" to the support representative.

  • Audio captcha is not working in mac safari 5.1.7. We used below code snippet that is working in other browser like IF 7,8,9, crome and firefox. Audio refresh is also not happening. When submit Audio Captcha then jcapcha framework giving InvocationTargetEx

    Audio captcha is not working in mac safari 5.1.7.
    We used a code snippet that is working in other browser like IF 7,8,9, crome and firefox.
    Audio refresh is also not happening.
    When submit Audio Captcha then jcapcha framework giving InvocationTargetException.
    <Edited By Host>

    Audio captcha is not working in mac safari 5.1.7.
    We used a code snippet that is working in other browser like IF 7,8,9, crome and firefox.
    Audio refresh is also not happening.
    When submit Audio Captcha then jcapcha framework giving InvocationTargetException.
    <Edited By Host>

  • Tried to download version 4, which replaced old 3.6, but I'm getting a message that version 4 will not work with Mac OS 10 (I have OS 10.4.11). How can I download previous Firefox version?

    Tried to download version 4, which replaced old 3.6, but I'm getting a message that version 4 will not work with Mac OS 10 (I have OS 10.4.11). How can I download previous Firefox version?

    You can download firefox 3.6.16 here: http://www.mozilla.com/en-US/firefox/all-older.html

  • In context not working with Mac Safari 6.04

    Hi there just noticed
    in context not working with Mac Safari 6.04, you can edit text, and save and publish but editable marquees are no longer visible especially the repeating elements?

    Hi Vicki,
    I would suggest submitting a support case on this for further investigation. 
    Unfortunately I'm on a PC machine so I cannot confirm on my end.  Please reach out to direct support ASAP if the issue is still existing. 
    - http://helpx.adobe.com/contact.html
    Kind regards,
    -Sidney

  • Tata Photon max on Huawei EC 315 is not working on Mac OS X 10.10

    Hi All!
    I have bought a Tata Photon max WiFi (Huawei EC 315) dongle, which is not working on Mac OS X 10.10.
    Does anybody know what is the problem?
    Do I need a different dialer?
    Do I need a new driver for the Huawei dongle?
    I didn't find satisfying solutions on Tata or Huawei homepage!
    Who can help me to get this run?
    I would be happy to get any feedback on my questions.
    Thanks in advance for your comments.
    MacMoe

    Hello, please check this step by step video tutorial youtube to solved problems huawei modems on mac os x 10.10 Yosemite....Works perfectly!!! :-)
    https://www.youtube.com/watch?v=jBM8qoV9VkM

  • I have a licensed copy of Adobe Acrobat X Pro for Windows.  I recently switched over to MAC OS and would like to move my Adobe X Pro over but the CD will not work for Mac OS?  Can anyone assist me with this conversion?  Best,  James.

    I have a licensed copy of Adobe Acrobat X Pro for Windows.  I recently switched over to MAC OS and would like to move my Adobe X Pro over but the CD will not work for Mac OS?  Can anyone assist me with this conversion?
    Best,
    James.

    you cannot use your pc license to install on a mac.  you would need a separate license (and serial number) for that.
    adobe allows platform swaps, but only with the latest (xi) version, Order product | Platform, language swap
    your option to use acrobat on a mac are to upgrade to acrobat pro xi and change platforms, use a windows emulator (parallels/boot camp etc) on your mac or swap with a third party.

  • ExportAsFDF javascript method is not working with Reader 10.1.1

    Hi,
    I have pdf document in which I have applied all Extendend Reader Rights. And now when I am trying to exports alll annotation in fdf with Reader 10.1.1 then it is faling to export. However it is working fine with Reader 10.0.0. Looks like this is broken in later version of 10.0.0.
    Please let me know if any alternative solution is there to export all annotation in fdf file thru code.
    Regards,
    Arvind

    I would open a formal support ticket with our developer support folks.
    From: Adobe Forums <[email protected]<mailto:[email protected]>>
    Reply-To: "[email protected]<mailto:[email protected]>" <[email protected]<mailto:[email protected]>>
    Date: Sun, 27 Nov 2011 22:48:35 -0800
    To: Leonard Rosenthol <[email protected]<mailto:[email protected]>>
    Subject: exportAsFDF javascript method is not working with Reader 10.1.1
    exportAsFDF javascript method is not working with Reader 10.1.1
    created by arvindg007<http://forums.adobe.com/people/arvindg007> in Acrobat SDK - View the full discussion<http://forums.adobe.com/message/4049525#4049525

  • Adobe Air not work on Mac OS X Yosemite

    Related issues:
    Adobe Air not working on Mac since OS X Yosemite upgrade
    Adobe Air isn't working with Mac OS X Yosemite?
    Bug report: Bug#3847656 - Adobe Air not work on Mac OS X Yosemite
    When I try to install any AIR application on OS X Yosemite (updated last week) I have got error ""Adobe AIR Application Installer" is damaged and can't be opened.".
    Uninstall and re-install AIR runtime didn't solve this issue. It works fine with Mac OS X Yosemite beta.

    It works fine with latest Adobe AIR Runtime (this week update).

  • How do I print in B&W now that I have lion? The whole "open in preview" method is not working. Thanks

    Subject says it all.....The whole "open in preview" method is not working. Any ideas or solutions would be appreciated. Thanks

    What kind of printer do you have? Have you looked at their PDEs to see if there are any settings for color/b&w?
    How is the "open in Preview" not working? Please provide some details.

  • REP-51018 -- cookie method is not working :(

    Trying to invoke a simple report from a simple form by using web.show_document()
    if I pass the userid=x/y@z then it work fine
    if I try to use the cookie method as defined in the OTN whitepaper "Secure Web.Show_Document() calls to Oracle Reports", I am bumping to the REP-51018 error.
    Tried the metalink and found primarily 2 documents, one (note#279938) is suggesting using
    SYNCHRONIZE; prior to invoking the WEB.SHOW_DOCUMENT(...), which I did - not worked,
    then I read the document (#309652.1) which tells that the cookie method will not work if not using fully qualified domain name -- I have a fully qualified domain name and I can see in the browser cookie settings that the domain is set correctly.
    I also edited the basejini.htm and basejpi.htm files and added the suggested entries as shown in the same OTN whitepaper (page #9). And recycled the entire iAS server after all the editing (reports.sh, formsweb.cfg, etc).
    I can see the cookie is saved on the client browser and the userid is displayed in the JInitiator control window.
    FrmReportsInteg0: Debugging true
    FrmReportsInteg0: Adding new userid string "zafer/mutlu@jtls5"
    FrmReportsInteg0: Default cookie domain: .rolands.com
    FrmReportsInteg0: set RW_AUTH10g
    FrmReportsInteg0: Arguments: encryptionKey=reports9i; Reports version=RW10g
    FrmReportsInteg0: Cookie value for RW10g is: zafer/mutlu@jtls5;1135302256455:30
    FrmReportsInteg0: Encoded cookie value is: W3zbSs88ClXKCO9kxqPbyQiyd120sKakxxmhtfgtZoUe4Q==
    FrmReportsInteg0: Complete cookie string is: userid=W3zbSs88ClXKCO9kxqPbyQiyd120sKakxxmhtfgtZoUe4Q==
    FrmReportsInteg0: Added domain ".rolands.com" to cookie
    FrmReportsInteg0: Generated Cookie String: userid=W3zbSs88ClXKCO9kxqPbyQiyd120sKakxxmhtfgtZoUe4Q==; domain=.rolands.com; path=/
    liveconnect: JSObject::eval(document.cookie="userid=W3zbSs88ClXKCO9kxqPbyQiyd120sKakxxmhtfgtZoUe4Q==; domain=.rolands.com; path=/")
    liveconnect: the url of the applet is http://raptus.rolands.com:7778 and the permission is = false
    FrmReportsInteg0: NS Cookie Set
    network: Connecting http://raptus.rolands.com:7778/forms/lservlet;jsessionid=0a0a0a2230d8a457f8e558fe43b4b3e5a9b908500738.e38Oc3aQc3ySci0TbheLaNuSah50n6jAmljGr5XDqQLvpAe with proxy=DIRECT
    network: Connecting http://raptus.rolands.com:7778/forms/lservlet;jsessionid=0a0a0a2230d8a457f8e558fe43b4b3e5a9b908500738.e38Oc3aQc3ySci0TbheLaNuSah50n6jAmljGr5XDqQLvpAe with cookie "userid=W3zbSs88ClXKCO9kxqPbyQiyd120sKakxxmhtfgtZoUe4Q=="
    network: Connecting http://raptus.rolands.com:7778/forms/lservlet;jsessionid=0a0a0a2230d8a457f8e558fe43b4b3e5a9b908500738.e38Oc3aQc3ySci0TbheLaNuSah50n6jAmljGr5XDqQLvpAe with proxy=DIRECT
    network: Connecting http://raptus.rolands.com:7778/forms/lservlet;jsessionid=0a0a0a2230d8a457f8e558fe43b4b3e5a9b908500738.e38Oc3aQc3ySci0TbheLaNuSah50n6jAmljGr5XDqQLvpAe with cookie "userid=W3zbSs88ClXKCO9kxqPbyQiyd120sKakxxmhtfgtZoUe4Q=="
    The only thing I can see is this line:
    liveconnect: the url of the applet is http://raptus.rolands.com:7778 and the permission is = false
    if this is the problem how can I fix it?
    What is wrong with this cookie method? What I am doing wrong?
    Any input is appreciated very much.
    Zaf.

    Here is the code I am using in a when-button-pressed trigger in the form to invoke the report.
    And yes, the javabean USERID_BEAN is created/defined under the CONTROL block, with all the properties as explained in the OTN whitepaper.
    thank you.
    =================================================
    message('Invoking the related report...', ACKNOWLEDGE);
    message(' ', NO_ACKNOWLEDGE);
    DECLARE
    rep_url varchar2(2000);     
    user_name varchar2(40);
    passwd varchar2(40) ;
    connectstring varchar2(20) ;
    BEGIN
    user_name := LOWER(get_application_property(username));
    passwd := LOWER(get_application_property(password));
    connectstring := LOWER(get_application_property(connect_string));
    rep_url:='/reports/rwservlet?&envid=jtlsDDS&&report=readme.rdf'
    ||'&desformat=htmlcss&destype=cache&userid=';
    -- Write log messages to the Forms JInitiator console. The next line must
    -- be disabled before running this code in any production environment
    set_custom_property('CONTROL.USERID_BEAN',1,'WRITE_LOGOUTPUT','true');
    -- set userid in encrypted cookie before calling Web.Show_Document()
    set_custom_property('CONTROL.USERID_BEAN',1,'ADD_USERID',
    user_name||'/'||passwd||'@'||connectstring);
    -- writing the cookie
    set_custom_property('CONTROL.USERID_BEAN',1,'WRITE_USERID_COOKIE','10g');
    -- Add the next line to correct REP 51018 error
    SYNCHRONIZE;
    WEB.SHOW_DOCUMENT(rep_url,'_blank');
    END;

  • Instance Dependent Public Method is not working for Workflow

    Hello Experts,
    I have made Custom class for  a workflow. This class is triggering the WF fine but the problem is while trying to execute a WF task which contains a Instance Dependent & Public  method its not working , the WF task is not processing though I'm passing the instance of the class  properly from WF to WF task . When I'm changing the method to Static & Public then the workitem is executing perfectly. Can you please help & suggest the way to find the problem ?
    Thanks & Regards ,
    Jeet

    Are you absolutely sure that you have the instance of the object in the workflow container? Open the technical log the see if the object instance is there - or is the container element initial (or "not set")?
    yes it is instantiated properly no error over there.
    What about if you test the method directly in SE24 (as an instance method)? Is it working then? If you can make it work in SE24 as an instance method and you are sure that the instance exists in the workflow,
    I have checked the class in a stand alone run in this case also it runs fine as before.
    The obvious question of course is that have you implemented the IF_WORKFLOW interface methods (the two first ones).
    it is coded like below
    BI_PERSISTENT~FIND_BY_LPOR
      create object result
          type
            (lpor-typeid)
          exporting
            ip_key = lpor-instid.
    CONSTRUCTOR
       me->m_KEY    = ip_key.
       me->m_por-catid = 'CL'.
       me->m_por-typeid = CL_ZZZ'.
       me->m_por-instid = me->m_key
    BI_PERSISTENT~LPOR
    result =  me->m_por.
    Main confusion is Method is working only if declared STATIC & PUBLIC  but not for the INSTANCE DEPENDENT & PUBLIC.

Maybe you are looking for

  • Leopard refuses to "see" iPhoto, even when it's running.

    I'm having an iPhoto problem with Leopard that is different than the ones I was able to find so far. I did an upgrade install from OS 10.4 and had iPhoto 6.0.6 installed. After upgrading, iPhoto is still there, it still runs and my photos are all fin

  • External Procurement with a Valuated Sales Order Stock

    Hi Experts, I read the following in SAP Help, For external procurement with a Valuated Sales Order Stock, system generates a purchase requisition from the sales order. If you are using a valuated sales order stock, the externally procured material is

  • Problem in compiling mysql++ libraries on Solaris 8 using Sun C++ compiler

    Hi! I am trying to compile the mysql++ libraries on Solaris 8 using the Sun C++ compiler CC 5.3 version. but I get an error: "../../../../tools/mysql++/lib//resiter.h", line 53: Error: Invalid template parameter default. Can anyone let me know what c

  • Buttons not working Lumia 1520

    After being on the wireless charger all night my phone had frozen early morning. I did a reset using the on/off and volume buttons. This worked. Then I noticed that all the buttons were unresponsive. Also the wireless charging was not working. I can

  • Where do I download Adobe Flash for IMac?

    Hello there folks. New IMac today.  Where should I download Adobe Flash/Reader from?  Does Apple have an approved third party software download site?  Do I just install from Adobe.com? Thanks, Theresa