Animations and handling events

Hi,
I want to display an animation on a JPanel. But when I draw on JPanel using a threads run method, the JPanel stops responding to other events such as mouse clicks on JButtons.
Can u plz tell me what is wrong.
Thanks a lot,
Chamal.

Hi,
Thanks a lot for your reply.
I am not that familiar with threads and GUI. What is UI thread. How can I avoid using it.
Best Regards,
Chamal.

Similar Messages

  • Dynamic Creation of list box on excel sheet and handling events

    hi all ,
    i m working on excel to sap integration application and for that i need to create dynmicaly list boxes in excel and also needs to handler events of each boxes..
    please suggest me somehting asap/
    thanks in advance,
    jigs
    helpful ans will be rewarded.

    hi all ,
    i m working on excel to sap integration application and for that i need to create dynmicaly list boxes in excel and also needs to handler events of each boxes..
    please suggest me somehting asap/
    thanks in advance,
    jigs
    helpful ans will be rewarded.

  • How to throw and handle event defined in component interface

    Hi folks,
    I have defined a component interface with an event 'open_info'
    I have some sub components which are implementing that component interface. I also get the two events generated (the interface check box is not marked)
    I use those sub components and try to handle the event. but unfortunately the event is not handled.
    I'm not sure if I do everything right. I checked the interface checkbox at the events tab of the controller of the sub component. I then may handle the event in the embedding main component. but it appears to be a different event.
    probably I eed to access the interface controller and throw the event there, but I don't know how.
    I couldn't fnd documentation or wdr* components which deal with that issue. do you have any suggestions?
    regards
    stefan

    Hi Stefan,
    Do the following in the component being used:
    say component name is ZCMP_01
    go to COMPONENTCONTROLLER
    Create an Event with necessary parameters if needed, say Event name is EVNT_01 and has an importing parameter, say PARAM_01 type char10,
    Make sure you have set the interface check box. Now this event is available in the INTERFACECONTROLLER.
    Say ZCMP_01 has a view with a button, on click of the button, call a method in the COMPONENTCONTROLLER.
    Perform all the required operations, At the required point, fire EVNT_01
    wd_this->fire_EVNT_01_evt(
          PARAM_01 = 'sample' ).
    Now the other component that has to use ZCMP_01, say ZCMP_02
    In the component properties od ZCMP_02, add usage for ZCMP_01, say USG_CMP_01
    Go to the view in ZCMP_02 where you wish to handle the event EVNT_01 of ZCMP_01,
    Go to Methods tab, create an event hadler, say EVNT_01_HNDLR ... method type = Event Handler,
    Event = EVNT_01, Controller = INTERFACECONTROLLER, Component Use, USG_CMP_01.
    Now your event handler will have foll parametrs: WDEVENT .. type ref to CL_WD_CUSTOM_EVENT,
    PARAM_01 type CHAR10
    Handle the event as required.
    Regards,
    Reema.

  • How to make a cell in a JTable to be uneditable and handle events

    I tried many things but failed,How do you make a cell in a JTable to be uneditable and also be able to handle events>Anyone who knows this please help.Thanx

    Hello Klaas2001
    You can add KeyListener ,MouseListener
    Suppose you have set the value of cell using setValueAt()
    table.addKeyListener(this);
    public void keyTyped(KeyEvent src)
    String val="";
    int r= table.getEditingRow();
    int c= table.getEditingColumn();
    val=table.getValueAt(r,c).toString();
    if (r!=-1 && c!=-1)
    TableCellEditor tableCellEditor = table.getCellEditor(r, c);
    tableCellEditor.stopCellEditing();
    table.clearSelection();
    table.setValueAt(val,r,c);
    public void keyReleased(KeyEvent src)
    public void keyPressed(KeyEvent src)
    table.addMouseListener(this);
    public void mouseClicked(MouseEvent e)
    public void mouseEntered(MouseEvent e)
    public void mouseExited(MouseEvent e)
    public void mousePressed(MouseEvent e)
    public void mouseReleased(MouseEvent e)
    if(e.getClickCount()>=2)//Double Click
    table.clearSelection();
    int r= table.getEditingRow();
    int c= table.getEditingColumn();
    if (r!=-1 && c!=-1)
    TableCellEditor tableCellEditor = table.getCellEditor (
    r,c);
    tableCellEditor.stopCellEditing();
    table.clearSelection();
    table.setValueAt("",r,c);
    }//Mouse Released
    You can remove keyListener and Mouse Listener whenever You want to edit
    then add it later.
    Regarding handling events implement javax.swing.event.TableModelListener
    table.getModel().addTableModelListener(this);
    public void tableChanged(javax.swing.event.TableModelEvent source)
    TableModel tabMod = (TableModel)source.getSource();
         switch (source.getType())
    case TableModelEvent.UPDATE:
         break;
         }//Table Changed Method
    //This method gets fired after table cell value is changed.

  • How to load external swf and handle events of external swf by passing data .

    Hi all
    I have to laoad external swf (made in flash).On loading i have to pass data and hndle events which occurs on this swf.
    Can any one suggest me how can I achieve this.
    Regards
    Munira

    Here is one way:
    http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf69084-7f9c.html
    HTH,

  • What is Triggering and Handling Events  in ABAP  OOPs

    Gowri

    ) TYPE type ..
    To declare static events, use the following statement:
    CLASS-EVENTS ... ...
    It links a list of handler methods with corresponding trigger methods.  There are four different types of event.
    It can be
    ·        An instance event declared in a class
    ·        An instance event declared in an interface
    ·        A static event declared in a class
    ·        A static event declared in an interface
    The syntax and effect of the SET HANDLER depends on which of the four cases listed above applies. 
    For an instance event, you must use the FOR addition to specify the instance for which you want to register the handler.  You can either specify a single instance as the trigger, using a reference variable
    After the RAISE EVENT statement, all registered handler methods are executed before the next statement is processed (synchronous event handling).  If a handler method itself triggers events, its handler methods are executed before the original handler method continues. To avoid the possibility of endless recursion, events may currently only be nested 64 deep.
    Handler methods are executed in the order in which they were registered.  Since event handlers are registered dynamically, you should not assume that they will be processed in a particular order. Instead, you should program as though all event handlers will be executed simultaneously.
    "Example  :
    REPORT demo_class_counter_event.
    CLASS counter DEFINITION.
      PUBLIC SECTION.
        METHODS increment_counter.
        EVENTS  critical_value EXPORTING value(excess) TYPE i.
      PRIVATE SECTION.
        DATA: count     TYPE i,
              threshold TYPE i VALUE 10.
    ENDCLASS.
    CLASS counter IMPLEMENTATION.
      METHOD increment_counter.
        DATA diff TYPE i.
        ADD 1 TO count.
        IF count > threshold.
          diff = count - threshold.
          RAISE EVENT critical_value EXPORTING excess = diff.
        ENDIF.
      ENDMETHOD.
    ENDCLASS.
    CLASS handler DEFINITION.
      PUBLIC SECTION.
        METHODS handle_excess
                FOR EVENT critical_value OF counter
                IMPORTING excess.
    ENDCLASS.
    CLASS handler IMPLEMENTATION.
      METHOD handle_excess.
        WRITE: / 'Excess is', excess.
      ENDMETHOD.
    ENDCLASS.
    DATA: r1 TYPE REF TO counter,
          h1 TYPE REF TO handler.
    START-OF-SELECTION.
      CREATE OBJECT: r1, h1.
      SET HANDLER h1->handle_excess FOR ALL INSTANCES.
      DO 20 TIMES.
        CALL METHOD r1->increment_counter.
      ENDDO.
    The class COUNTER implements a counter. It triggers the event CRITICAL_VALUE when a threshold value is exceeded, and displays the difference. HANDLER can handle the exception in COUNTER. At runtime, the handler is registered for all reference variables that point to the object.
    Reward  points if it is usefull ...
    Girish

  • Can you view text outside of the canvas? as with the view menu you can see animation paths, bounding boxes and handles??? many thanks

    re: Motion 5
    can you view text outside of the canvas? as when using the view menu you can see animation paths, bounding boxes and handles???
    I'm in the middle of a text animation design treatment and unless my memory is completely failing I thought this was an option.
    An example would be selecting all layers and being able to see all bounding boxes and animation paths while moving along the timeline.
    Of course this could be quite a mess if you couldn't selectively chose which layers, its just with this current project it would be so helpful if
    I could see the text beyond the canvas to aid in my animations.
    many thanks,
    robert
    Motion 5
    2014 MacBook Pro 2.6Ghz i7
    16GB RAM
    OS X 10.9.5
    2011 Mac Pro
    4 Boot drives OS X 10.9.4, 10.10, 10.7, 10.8
    960GB OWC Mercury Accelsior_E2 PCI Express SSD (Current screaming fast boot drive)
    64GB RAM

    thanks for both of your responses
    I do understand shift + v " to "Show Full View Area" and shift + z to fill screen, etc.
    and command + & - for zooming
    what I'd like to do is selectively view, say, the text outside of the canvas as you can see the bounding box
    which contains the text or object when selecting one or all layers in the layers column
    I haven't used this feature in a while though I do recall using it in the past.
    Any help would greatly appreciated
    thanks,
    R.

  • To place drill-out images and Handling Drill-Out Events in a  crosstab ?

    in the bibeans help, it is possible to manage drill out in a thin Crosstab.
    Is it possible to do it with Crosstab ?
    thanks

    I checked with development and strangely the Java client Crosstab doesn't support putting URLs in the cells. So we have a disconnect between thick and thin crosstabs, something that will have to be resolved in a future release. However, it does support showing drill out icons and firing events when the user clicks on them. The application is responsible for handling the drill out event, which could involve launching a browser and going to some URL.
    Looking at your code below, nothing obviously wrong comes to mind. An initial debugging step might be to uncomment the line // dataViewStyle.setBackground(Color.BLUE); to see if the rule applies formatting other than the drill out icon. There may be a problem with the QDR or the rule. If the blue background applies, then there may be a problem with the image path specified. Maybe the Crosstab can't load the given image. Are there any error messages logged to the ErrorHandler?
    Hope this helps,
    Keith
    Oracle Business Intelligence Product Management
    BI on Oracle: http://www.oracle.com/bi/
    BI on OTN: http://www.oracle.com/technology/products/bi/
    BI Beans http://www.oracle.com/technology/products/bib/index.html
    Discoverer: http://www.oracle.com/technology/products/discoverer/
    BI Software: http://www.oracle.com/technology/software/products/ias/devuse.html
    Documentation: http://www.oracle.com/technology/documentation/appserver1012.html
    BI Samples: http://www.oracle.com/technology/products/bi/samples/
    Blog: http://oraclebi.blogspot.com/

  • Multiple movieclips and mutiple event handling.

    Hi All,
    I have multiple movieclips(images sequence), which I want to add mouseevent (click and drag), keyboard event(left and right arrows) and zoom event(mouse wheel).
    I have this function for only one mc(one image sequence).
    Now if I use this function, I am having problem with calling the function from the same frame.
    That is,
    If click another mc from say frame 3, and click on another function, it should continue from frame 3 only, not start from first frame again.
    Please help.
    Thanks in advance.

    I assume that shows the part where you rotete the house view in a 360degree fashion?
    if so, make a global var on your root timeline:
    var rotationframe:int = 1; //in the beginning of the app all the dirffernt images are sitting on frame 1
    you can access this var from anywehere inside any function of your app by calling:
    root.rotationframe
    now in the function that handles the rotation (lets say its your keyboard function) in the end (after you moved the playhead) you make sure to always set
    root.rotationframe  =  garage.currentFrame;
    and in the function that handles the switching between images you write sth. like
    gotoAndStop(root.rotationframe);
    Be aware, you can`t simply use that code without adapting it to your special needs.

  • [svn:cairngorm3:] 16673: Removed selectors and [ManagedEvents] tags, We are now using dispatchers and explicit event types to handle commands

    Revision: 16673
    Revision: 16673
    Author:   [email protected]
    Date:     2010-06-25 09:43:24 -0700 (Fri, 25 Jun 2010)
    Log Message:
    Removed selectors and tags, We are now using dispatchers and explicit event types to handle commands
    Modified Paths:
        cairngorm3/trunk/samples/insync/insync-basic/src/InsyncContext.mxml
        cairngorm3/trunk/samples/insync/insync-basic/src/insync/application/RefreshSearchAfterSav eController.as
        cairngorm3/trunk/samples/insync/insync-basic/src/insync/application/RemoveContactCommand. as
        cairngorm3/trunk/samples/insync/insync-basic/src/insync/application/RemoveContactIntercep tor.as
        cairngorm3/trunk/samples/insync/insync-basic/src/insync/application/SaveContactCommand.as
        cairngorm3/trunk/samples/insync/insync-basic/src/insync/application/SearchEvent.as
        cairngorm3/trunk/samples/insync/insync-basic/src/insync/presentation/ContactFormPM.as
        cairngorm3/trunk/samples/insync/insync-basic/src/insync/presentation/ContactsListPM.as
        cairngorm3/trunk/samples/insync/insync-basic/src/insync/presentation/ContactsNavigatorPM. as
        cairngorm3/trunk/samples/insync/insync-basic/src/insync/presentation/ToolbarPM.as
        cairngorm3/trunk/samples/insync/insync-basic/test/insync/application/RefreshSearchAfterSa veControllerTest.as
        cairngorm3/trunk/samples/insync/insync-basic/test/insync/application/RemoveContactCommand Test.as
        cairngorm3/trunk/samples/insync/insync-basic/test/insync/application/SaveContactCommandTe st.as
    Added Paths:
        cairngorm3/trunk/samples/insync/insync-basic/src/insync/application/AddContactEvent.as
        cairngorm3/trunk/samples/insync/insync-basic/src/insync/application/EditContactEvent.as
        cairngorm3/trunk/samples/insync/insync-basic/src/insync/application/RemoveContactEvent.as
        cairngorm3/trunk/samples/insync/insync-basic/src/insync/application/SaveContactEvent.as

    bleach wrote:
    i see these
    URxvt*background: #171717
    URxvt*foreground: #B2B2B2
    URxvt*color0: #171717
    URxvt*color1: #3D3D3D
    URxvt*color2: #ffffff
    are not commented out
    3d3d3d is for red but you have a blackish and color2 is for green but you have it white the rest should be the default colors. it uses the same colors only it changes the vairiant of the color you choice there or normally moc uses colors such as green blue and such which will call your console colors for those respective fields I know moc has /user/share/moc/themes/ that you can edit or make your own for instance copy one and edit it. I think htop uses the same color count which is 8 but with so green will be white when you use urxvt. 8 for normal colors 16 for bright dark and urxvt is 256 which is 16 but can use any of the 256 colors for 16.
    just to clarify you have commented out your colors 4-15 and your green and red is weird, and htop aswell as moc is 8 bit. moc theme_yellow_red is default for background so it will use urxvts background
    Haahaha, that is simple. And it works!!!
    I didn't bother with commenting that because i thought they are not applied. Anyway, thanks man. My urxvt terminal si grateful to you and your thorough explanation. SOLVED!

  • Javascript error in event handler event type = timeline

    Hi,
    I have a small EdgeAnimate projekt with version 1.5.0 and the local export works fine... I must include the package at a CMS and I update all paths to absolute paths and all files are loading...
    but I the animation dont play - I see at the javascript console the follow output
    javascript error in event handler event type = timeline   edge.1.5.0.min.js:143
    Springender Punkt: Rettungswagen - Der springende Punkt
    I dont found any solution... :-((

    Hi Scott,
    I have gone through your shared composition created in older verion of Edge.
    If you open the older composition html page in browser, there already have some of the error messages in the console as you mentioned above like
          Javascript error in event handler! Event Type = timeline.
    And as you said with the latest Edge, when you upgrade the old composition, some new error messages gets added to the existing ones.
    As in the latest Edge, the whole of runtime has been shake-up, some of the attributes has been removed and are added in different way.
    Example: To access timelines of a symbol:
         Old way:           sym.timelines['Default Timeline']
         New way:          sym.data[sym.name].timeline
    You need to make some modifications in index_edgeActions.js file like:
         1. Search & Replace "timelines['Default Timeline']" with "data[sym.name].timeline"
         2. And in the code taken from EdgeCommons.js, replace "getVariable("symbolSelector")" with "_variables["symbolSelector"]".
    Hope, these changes will remove the new JS issues you mentioned.
    hth,
    Vivekuma

  • [svn:fx-trunk] 12481: Because of the Change/Changing changes in VideoPlayer , we need to also listen for a CHANGE as well as the CHANGE_END, CHANGE_START, THUMB_PRESS, and THUMB_RELEASE events.

    Revision: 12481
    Revision: 12481
    Author:   [email protected]
    Date:     2009-12-03 18:48:17 -0800 (Thu, 03 Dec 2009)
    Log Message:
    Because of the Change/Changing changes in VideoPlayer, we need to also listen for a CHANGE as well as the CHANGE_END, CHANGE_START, THUMB_PRESS, and THUMB_RELEASE events.
    Also, when clicking on the track and animating, the scrubbar's playedArea should move along with the thumb.  We do this by using pendingValue, rather than value in updateSkinDisplayList().
    QE notes: -
    Doc notes: -
    Bugs: SDK-24528
    Reviewer: Kevin
    Tests run: checkintests
    Is noteworthy for integration: No
    Ticket Links:
        http://bugs.adobe.com/jira/browse/SDK-24528
    Modified Paths:
        flex/sdk/trunk/frameworks/projects/spark/src/spark/components/VideoPlayer.as
        flex/sdk/trunk/frameworks/projects/spark/src/spark/components/mediaClasses/ScrubBar.as

    My first observation is that you don't reraise the error in the CATCH handler. That is bad, because it makes the proceedure fail silently which may be very difficult to troubleshoot.
    The version numbers for Change Tracking are indeed database-global. MIN_VALID_VERSION can be different for different tables, if they have different retention periods. But if they all have the same retention period, it seems likely that MIN_VALID_VERSION
    would increase as the database moves on.
    I'm not sure about your question Can we use the CHANGE_TRACKING_CURRENT_VERSION even though we want to download subset of data from the table (only records matching for one data_source_key at a time). Where would you use it? How would you use
    it?
    Erland Sommarskog, SQL Server MVP, [email protected]

  • Fastest way to handle events? 25 Dukes

    I need to handle events very fast. I'm using OpenGL for my graphics, but I'd still like to use java for everything else. Now I have a problem, I need to override the event dispatch thread with my main thread so that I can get the event dispatch thread to correlate perfectily with the animation loop. Also if someone can give me the full list of other threads running, I'd also like to stop the awt animation thread if it is possible since OpenGL does all the animation required.
    I'm doing things kind of funny:
    I have infinite loop that animates as fast as it can, and I have a thread which is runs along the loop. This thread handles all the movement on the screen and also it handles the user input. Now the closest thing I have done so far is the eventDispatched() / AWTListener interface, but I'm afraid that this is the same problem.
    Technically this is so much stuff that if you can answer all I'll reward you with 25 points one way or another, if you answer partially You'll get 10.

    You can use Thread.currentThread().getThreadGroup().list() to get a list on threads (if you don't have thread groups). Search through the returned array, and if getName().startsWith("AWT-") destroy() or stop(new VMError()) it. Now go use JNI and go:while (GetMessage(&msg, NULL, 0, 0) > 0) {
        if (javaDontMind()) {
            TranslateMessage(&msg);
            DispatchMessage(&msg);
    }The above instructions may comprimize your system. Try writing your own toolkit if Windows blows up.

  • What is the diffrence between sap events and application events

    Hi all,
    what is the diffrence between sap events and application events.Can any one tell me with examples.
    regards,

    Hi,
    Look at this,
    <b>System Events (Default)</b>
    The event is passed to the application server, but does not trigger the PAI. If you have registered an event handler method in your ABAP program for the event (using the SET HANDLER statement), this method is executed on the application server.
    Within the event handler method, you can use the static method SET_NEW_OK_CODE of the global class CL_GUI_CFW to set a function code and trigger the PAI event yourself. After the PAI has been processed, the PBO event of the next screen is triggered.
    The advantage of using this technique is that the event handler method is executed automatically and there are no conflicts with the automatic input checks associated with the screen. The disadvantage is that the contents of the screen fields are not transported to the program, which means that obsolete values could appear on the next screen. You can work around this by using the SET_NEW_OK_CODE method to trigger field transport and the PAI event after the event handler has finished.
    <b>Application Events</b>
    The event is passed to the application server, and triggers the PAI. The function code that you pass contains an internal identifier. You do not have to evaluate this in your ABAP program. Instead, if you want to handle the event, you must include a method call in a PAI dialog module for the static method DISPATCH of the global class CL_GUI_CFW. If you have defined an event handler method in your ABAP program for the event (using the SET HANDLER statement), the DISPATCH method calls it. After the event handler has been processed, control returns to the PAI event after the DISPATCH statement and PAI processing continues.
    The advantage of this is that you can specify yourself the point at which the event is handled, and the contents of the screen fields are transported to the application server beforehand. The disadvantage is that this kind of event handling can lead to conflicts with the automatic input checks on the screen, causing events to be lost.
    Hope u understood.
    Thanks&Regards,
    Ruthra.R

  • How to open page in new window while handling event on link.

    Hi all
    I have a requirement where page should be opened in new window when I click on link.My item style is 'link'.Despite of mentioning target frame _blank, I m not able to open it in new window.I m handling event by setting Action Type as fireAction.I hope this might be the reason because of that this happened. Can somebody suggest some solution so that I can open it in new window.
    Thanks,
    Bhupendra

    Hi ,
    though i am not able to answer, i can get some answer for my question.
    How the link item is handled thru the ActionType and event in the Client Action..?
    The reason for this question is that we are trying to extend the customer search page in AR - EBSR12. there the search result page has the Account Name as a link and the Action event says viewAccountName and the action type says firePartialAction. I am trying to understand this so that i can add more parameters to the link so that i can use them in the target page of the link..
    Any help is appreciated..
    Thanks
    Chidam

Maybe you are looking for

  • How to print new line in webdynpro

    Friends, I want to print a success message in new line, the below shown is a one singe line and want to split two lines. I used this: wdComponentAPI.getMessageManager().reportSuccess("Example : this is the test message i would like to print in two li

  • AddActionListener to JDielog problem please help

    HI I have an add button on a jframe, The add button brings up a Jdielog, and the dielog has a save button, Now to the save button I have an addActionListenere to save the adding, And it doesn�t work. If I change the dielog to a jframe the addActionLi

  • Error Handling and Error Messages

    I already posted this in the java programming forum, but I dont think the people responded understand patterns, or what I was asking. Here is my original post, for reference I am not asking how to catch and exception, or how to display an error, I am

  • Customer exit : i_vnam table empty

    Hi, I have a specific requirement where I need a customer exit variable to be processed twice (once in i_step = 1 and the second time in i_step = 2 ). The problem I am facing is that after the i_step = 1 is processed for both my customer exit variabl

  • PGW 2200 failing to import trunks file

    Hello , Would someone help with following problem : I have working PGW2200 in nailed mode and I try to remove one E1 line from its configuration. Import of trunks file seems to be OK ( I get  COMPLD    "files:WARNING: All existing bearer channels hav