Problem in Cursor

Hello i've made one program which certainly changes it's cursor to busy..(for non response) when clicked at a button.
But even it's in busy cursor it just takes the click of another button ..
How can i make cursor non response after the mouse is clicked to a button

Making the frame and everything in it completely unresponsive to the busy cursor can be somewhat tricky [even in swing|http://tips4java.wordpress.com/2008/11/07/disabled-glass-pane/]. With AWT I'm not sure how it would be done, or if it can be done beyond the trivial frame.setEnabled(false).

Similar Messages

  • Problem in cursor query

    hi
    i got the problem in cursor.
    i have a table called trav. with one column named "sno". i inserted values as 1,2,5,10.
    only upto 1-10 are allwed to enter ,
    now i want remaining numbers as 3,4,6,7,8,9.
    but this gives answer as 3,4,5,6,7,8,9.
    here 5 is repeated so i tried a lot but invain.
    my code is
    declare
    cursor cc is select sno from trav order by sno;
    a number(2);
    begin
    open cc;
    for i in 1..10
    loop
    fetch cc into a;
    if (i != a )
    then
    dbms_output.put_line(i);
    end if;
    end loop;
    end;
    so i want the output correctly whereas it returnd as 5 repeated value.
    please help me. waiting for repl

    DECLARE
    CURSOR cc
    IS
    SELECT DISTINCT sno
    FROM trav
    ORDER BY sno;
    i NUMBER (2) := 1;
    BEGIN
    FOR a IN cc
    LOOP
    IF (i != a.sno) AND a.sno <= 10
    THEN
    WHILE i < a.sno
    LOOP
    DBMS_OUTPUT.PUT_LINE (i);
    i := i + 1;
    END LOOP;
    END IF;
    i := i + 1;
    END LOOP;
    END;
    null

  • Problems With CURSORS in PRO*C

    Hi all,
    I have a problem with cursors in proc
    1. Can i declare a cursor and with in it another cursor in proc
    like
    EXEC SQL DECLARE emp_cursor CURSOR FOR
    SELECT ........;
    EXEC SQL OPEN emp_cursor;
    for(;;)
    EXEC SQL FETCH emp_cursor INTO :emp_structure;
    EXEC SQL DECLARE dept_cursor FOR
    SELECT ...............;
    EXEC SQL OPEN dept_cursor;
    for(;;)
    EXEC SQL FETCH dept_cursor INTO :dept_structure;
    EXEC SQL CLOSE dept_cursor;
    EXEC SQL CLOSE emp_cursor;
    2. im getting the following error after getting an result
    ORA-01405: fetched column value is NULL
    though i dont have any null columns.
    please help me in this regard,
    Thanks in Advance,
    Trinath Somanchi,
    Hyderabad.
    null

    Use Indicator variables and let me know if it solves your problem.
    http://docs.jcu.edu.au/oracle/doc/server.804/a58233/dev.htm#2239

  • 10.8.2 Problem#3 - Cursor sometime disappears while zooming

    Starting Info : https://discussions.apple.com/message/19932291#19932291
    10.8.2 Problem#3 - Cursor sometime disappears while zooming
    I'm always using Accesibilty/Zoom function and sometime while typing on Safari's textbo, cursor just gone.

    See this thread. It's been reported since 2011. I haven't yet seen a solution.
    https://discussions.apple.com/thread/3324908?start=0&tstart=0

  • Pages: My problem is cursor moves involuntary to a different paragraph or line;  and overshadow words

    My problem is cursor moves involuntary to a different paragraph or line;  and additional overshadow words

    You might want to consider starting a new discussion. Since this one is marked solved, less people are likely to look at it. You can link to this one.

  • Problem with Cursors in Photoshop CS4

    I am only seeing partial cursors (i.e. semi-circles or truncated brush tips) for cursors when I enlarge the cursor size.  This is happening across all tools wherever I enlarge the brush tip.  I tried resetting the preferences and updating the video drivers with no luck.  I am running on Windows XP Professional on a Dell desktop using a Dell monitor that has an nVidia GEForce 8600 GTS video driver running version 6.14.11.5851.  I had updated the driver to the latest version but the PC became unstable, causing a system dump and "blue screen of death", so I rolled back to this version.  I also use a Wacom tablet with the setup.  It had been working fine and I am not aware of any changes to the system that would have caused this.  I have an open ticket with Adobe for about two weeks but so far the problem has not been resolved.  Does anyone have any suggestions?

    Have you updated Photoshop to vession 11.0.1?
    Have you tried turning off OpenGL in preferences?
    I don't see your card on this list either:
    List of tested graphics display cards for Photoshop CS4
    http://kb2.adobe.com/cps/405/kb405711.html

  • Problem viewing cursor value in debug mode

    Hi eveybody!
    I'm French and new here.
    I know some topics deal with my subject but I don't really understand.
    Here's my environnement :
    Win2000 / ORA 9iR2 / SQL DEVELOPPER 1.0.0.15.57
    As some people say when i'm in debug mode (after compiling my procedure PL/SQL for debug) I can't see any value of my cursors !
    Ex :
    CURSOR cur IS
    SELECT COL1, COL2
    FROM TABLE1;
    v_cur cur%ROWTYPE;
    For v_cur in cur
    Loop
    If v_cur.COL1 = 'toto' then
    'do something' ;
    End if;
    End Loop;
    When I run this step by step in debug mode I can't see the data of my cursor in the data or smartdata pane.
    The values of my cursor is allways null !
    I guess I'm not the only one to see that bug.
    My question is should I wait a new release of sql developer or is there any solution for this problem?
    Anyway I want to congratulate the developers team who create this tool which is fabulous! It makes me forget TOAD and it's totally free.
    Thanks a lot for this job.
    Greg

    Here is a piece of code I use:
    CREATE OR REPLACE PROCEDURE sm_list AS CURSOR emp_cursor IS
    SELECT d.department_name,
    e.last_name
    FROM departments d,
    employees e
    WHERE d.department_id = e.department_id;
    emp_record emp_cursor % rowtype;
    BEGIN
    FOR emp_record IN emp_cursor
    LOOP
    DBMS_OUTPUT.PUT_LINE(emp_record.last_name);
    END LOOP;
    END;
    With this example, I agree, the smart data is null. Logged a bug. However, note that I do see values in the data tab and can modify and watch these values.
    When using cursors I've been looping and then fetching into cursor records, i.e.:
    FETCH emp_cursor
    INTO emp_record;
    emp_tab(i) := emp_record;
    and then the values display in the Smart data and data tabs.
    Sue

  • Problem with cursors

     

    I can't open a cursor on the same table on which I'm doing some operation
    (inserting, deleting, etc).Mutating table problem, see Tom Kyte's advise:
    http://asktom.oracle.com/~tkyte/Mutate/index.html
    Rgds.

  • Performance problem - event : cursor: pin S wait on X

    Hi,
    Bellow is 17 min awr report , of oracle PeopleSoft DB on 10204 instance on HPUX machine.
    During this time the customers complained on poor performance.
    There were 4,104.23 execution per second and 3,784.95 parses
    which mean that almost any statment was parsed. since the Soft Parse %= 99.77
    its seems that most of the parses are soft parse.
    During those 17 min , the DB Time = 721.74 min and the "Top 5 Timed Events"
    shows : "cursor: pin S wait on X" at the top of the Timed Events
    Attached some details for the awr report
    Could you please suggest where to focus ?
    Thanks
    WORKLOAD REPOSITORY report for
    DB Name         DB Id    Instance     Inst Num Release     RAC Host
    xxxx          2993006132 xxxx                1 10.2.0.4.0  NO  xxxx
                  Snap Id      Snap Time      Sessions Curs/Sess
    Begin Snap:     18085 25-Mar-10 10:30:41       286      14.9
      End Snap:     18086 25-Mar-10 10:48:39       301      15.1
       Elapsed:               17.96 (mins)
       DB Time:              721.74 (mins)
    Cache Sizes
    ~~~~~~~~~~~                       Begin        End
                   Buffer Cache:     4,448M     4,368M  Std Block Size:         8K
               Shared Pool Size:     2,736M     2,816M      Log Buffer:     2,080K
    Load Profile
    ~~~~~~~~~~~~                            Per Second       Per Transaction
                      Redo size:          3,831,000.13            271,096.84
                  Logical reads:            164,733.47             11,657.20
                  Block changes:             17,757.42              1,256.59
                 Physical reads:                885.19                 62.64
                Physical writes:                504.92                 35.73
                     User calls:              5,775.09                408.67
                         Parses:              3,784.95                267.84
                    Hard parses:                  8.55                  0.60
                          Sorts:                212.37                 15.03
                         Logons:                  0.77                  0.05
                       Executes:              4,104.23                290.43
                   Transactions:                 14.13
      % Blocks changed per Read:   10.78    Recursive Call %:    24.14
    Rollback per transaction %:    0.18       Rows per Sort:    57.86
    Instance Efficiency Percentages (Target 100%)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                Buffer Nowait %:   99.98       Redo NoWait %:   99.97
                Buffer  Hit   %:   99.47    In-memory Sort %:  100.00
                Library Hit   %:   99.73        Soft Parse %:   99.77
             Execute to Parse %:    7.78         Latch Hit %:   99.77
    Parse CPU to Parse Elapsd %:    3.06     % Non-Parse CPU:   89.23
    Shared Pool Statistics        Begin    End
                 Memory Usage %:   34.44   34.78
        % SQL with executions>1:   76.52   60.40
      % Memory for SQL w/exec>1:   73.75   99.18
    Top 5 Timed Events                                         Avg %Total
    ~~~~~~~~~~~~~~~~~~                                        wait   Call
    Event                                 Waits    Time (s)   (ms)   Time Wait Class
    cursor: pin S wait on X           1,378,354      13,462     10   31.1 Concurrenc
    db file sequential read             878,684       8,779     10   20.3   User I/O
    CPU time                                          4,998          11.5
    local write wait                      2,692       2,442    907    5.6   User I/O
    cursor: pin S                     1,932,830       2,270      1    5.2      Other
    Time Model Statistics                  DB/Inst: xxxx/xxxx  Snaps: 18085-18086
    Statistic Name                                       Time (s) % of DB Time
    sql execute elapsed time                             21,690.6         50.1
    parse time elapsed                                   17,504.9         40.4
    DB CPU                                                4,998.0         11.5
    hard parse elapsed time                                 372.1           .9
    connection management call elapsed time                 183.9           .4
    sequence load elapsed time                              125.8           .3
    PL/SQL execution elapsed time                            89.2           .2
    PL/SQL compilation elapsed time                           9.2           .0
    inbound PL/SQL rpc elapsed time                           5.5           .0
    hard parse (sharing criteria) elapsed time                5.5           .0
    hard parse (bind mismatch) elapsed time                   0.5           .0
    failed parse elapsed time                                 0.1           .0
    repeated bind elapsed time                                0.0           .0
    DB time                                              43,304.1          N/A
    background elapsed time                               3,742.3          N/A
    background cpu time                                     114.8          N/A
                                                                      Avg
                                           %Time       Total Wait    wait     Waits
    Wait Class                      Waits  -outs         Time (s)    (ms)      /txn
    Concurrency                 1,413,633   97.5           14,283      10      92.8
    User I/O                      925,010     .3           11,485      12      60.7
    Other                       1,984,969     .2            2,858       1     130.3
    Application                     1,342   46.4            1,873    1396       0.1
    Configuration                  12,116   63.6            1,857     153       0.8
    System I/O                    582,094     .0            1,444       2      38.2
    Commit                         17,253     .6            1,057      61       1.1
    Network                     6,180,701     .0               68       0     405.9
    Wait Events                            DB/Inst: xxxx/xxxx  Snaps: 18085-18086
                                                                       Avg
                                                 %Time  Total Wait    wait     Waits
    Event                                 Waits  -outs    Time (s)    (ms)      /txn
    cursor: pin S wait on X           1,378,354  100.0      13,462      10      90.5
    db file sequential read             878,684     .0       8,779      10      57.7
    local write wait                      2,692   91.2       2,442     907       0.2
    cursor: pin S                     1,932,830     .0       2,270       1     126.9
    log file switch (checkpoint           2,669   49.1       1,510     566       0.2
    enq: RO - fast object reuse             542   86.5       1,398    2580       0.0
    log file sync                        17,253     .6       1,057      61       1.1
    control file sequential read        450,043     .0         579       1      29.6
    log file parallel write              17,903     .0         558      31       1.2
    enq: TX - row lock contentio            295   52.2         475    1610       0.0
    buffer busy waits                     7,338    4.4         348      47       0.5
    buffer exterminate                      322   92.5         302     938       0.0
    read by other session                24,694     .0         183       7       1.6
    library cache lock                       59   94.9         167    2825       0.0
    log file sequential read            109,494     .0         161       1       7.2
    latch: cache buffers chains          18,662     .0         149       8       1.2
    log buffer space                      2,493     .0         139      56       0.2
    Log archive I/O                       3,592     .0         131      37       0.2
    free buffer waits                     6,420   99.1         130      20       0.4
    latch free                           42,812     .0         121       3       2.8
    Streams capture: waiting for            845    6.0         106     125       0.1
    latch: library cache                  2,074     .0          96      46       0.1
    db file scattered read               12,437     .0          80       6       0.8
    enq: SQ - contention                    150   14.0          71     471       0.0
    SQL*Net more data from clien        331,961     .0          41       0      21.8
    latch: shared pool                      320     .0          32     100       0.0
    LGWR wait for redo copy               5,307   49.1          29       5       0.3
    SQL*Net more data to client         254,217     .0          17       0      16.7
    control file parallel write           1,038     .0          15      14       0.1
    latch: library cache lock               477     .4          14      29       0.0
    latch: row cache objects              6,013     .0          10       2       0.4
    SQL*Net message to client         5,587,878     .0          10       0     366.9
    latch: redo allocation                1,274     .0           9       7       0.1
    log file switch completion               62     .0           6      92       0.0
    Streams AQ: qmn coordinator               1  100.0           5    4882       0.0
    latch: cache buffers lru cha            434     .0           4       9       0.0
    block change tracking buffer            111     .0           4      35       0.0
    wait list latch free                    135     .0           3      21       0.0
    enq: TX - index contention              132     .0           2      17       0.0
    latch: session allocation               139     .0           2      14       0.0
    latch: object queue header o            379     .0           2       4       0.0
    row cache lock                           15     .0           2     107       0.0
    latch: redo copy                         56     .0           1      17       0.0
    latch: library cache pin                184     .0           1       5       0.0
    write complete waits                     14   28.6           1      51       0.0
    latch: redo writing                     251     .0           1       3       0.0
    enq: MN - contention                      3     .0           1     206       0.0
    enq: CF - contention                     16     .0           0      23       0.0
    log file single write                    24     .0           0      13       0.0
    os thread startup                         3     .0           0     102       0.0
    reliable message                         66     .0           0       4       0.0
    enq: JS - queue lock                      2     .0           0     136       0.0
    latch: cache buffer handles              46     .0           0       5       0.0
    buffer deadlock                          65  100.0           0       4       0.0
    latch: undo global data                  73     .0           0       3       0.0
    change tracking file synchro             24     .0           0       6       0.0
    change tracking file synchro             30     .0           0       3       0.0
    kksfbc child completion                   2  100.0           0      52       0.0
    SQL*Net break/reset to clien            505     .0           0       0       0.0
    db file parallel read                     3     .0           0      30       0.0
                                                                       Avg
                                                 %Time  Total Wait    wait     Waits
    Event                                 Waits  -outs    Time (s)    (ms)      /txn
    SQL*Net more data from dblin            127     .0           0       0       0.0
    SQL*Net more data to dblink             319     .0           0       0       0.0
    latch: enqueue hash chains               20     .0           0       2       0.0
    latch: checkpoint queue latc              5     .0           0       5       0.0
    SQL*Net message to dblink             6,199     .0           0       0       0.4
    enq: TX - allocate ITL entry              1     .0           0      22       0.0
    direct path read                      5,316     .0           0       0       0.3
    latch: messages                          24     .0           0       1       0.0
    enq: US - contention                      3     .0           0       4       0.0
    direct path write                     1,178     .0           0       0       0.1
    rdbms ipc reply                           1     .0           0       1       0.0
    library cache load lock                   2     .0           0       0       0.0
    direct path write temp                    3     .0           0       0       0.0
    direct path read temp                     3     .0           0       0       0.0
    SQL*Net message from client       5,587,890     .0     135,002      24     366.9
    wait for unread message on b          7,809   21.8       3,139     402       0.5
    LogMiner: client waiting for        262,604     .1       3,021      12      17.2
    LogMiner: wakeup event for b      1,405,104    2.4       2,917       2      92.3
    Streams AQ: qmn slave idle w            489     .0       2,650    5420       0.0
    LogMiner: wakeup event for p        123,723   32.1       2,453      20       8.1
    Streams AQ: waiting for time              9   55.6       1,790  198928       0.0
    LogMiner: reader waiting for         45,193   51.3       1,526      34       3.0
    Streams AQ: waiting for mess            297   99.3       1,052    3542       0.0
    Streams AQ: qmn coordinator             470   33.8       1,050    2233       0.0
    Streams AQ: delete acknowled            405   32.3       1,049    2591       0.0
    jobq slave wait                         379   77.8         958    2529       0.0
    LogMiner: wakeup event for r         16,591   10.6         125       8       1.1
    SGA: MMAN sleep for componen          3,928   99.3          35       9       0.3
    SQL*Net message from dblink           6,199     .0          31       5       0.4
    single-task message                     108     .0           8      74       0.0
    class slave wait                          3     .0           0       0       0.0
    Background Wait Events                 DB/Inst: xxxx/xxxx  Snaps: 18085-18086
    -> ordered by wait time desc, waits desc (idle events last)
                                                                       Avg
                                                 %Time  Total Wait    wait     Waits
    Event                                 Waits  -outs    Time (s)    (ms)      /txn
    log file parallel write              17,916     .0         558      31       1.2
    Log archive I/O                       3,592     .0         131      37       0.2
    log file sequential read              3,636     .0          47      13       0.2
    events in waitclass Other             6,149   42.4          40       7       0.4
    log file switch (checkpoint              30   53.3          19     619       0.0
    control file parallel write           1,038     .0          15      14       0.1
    db file sequential read               1,166     .0           6       5       0.1
    control file sequential read          2,986     .0           6       2       0.2
    latch: shared pool                        4     .0           4     917       0.0
    latch: library cache                      5     .0           3     646       0.0
    free buffer waits                       160   98.8           2      10       0.0
    buffer busy waits                         2     .0           1     404       0.0
    latch: redo writing                      19     .0           0      23       0.0
    log file single write                    24     .0           0      13       0.0
    os thread startup                         3     .0           0     102       0.0
    log buffer space                          7     .0           0      35       0.0
    latch: cache buffers chains              16     .0           0       8       0.0
    log file switch completion                1     .0           0      71       0.0
    latch: library cache lock                 3   66.7           0      11       0.0
    latch: redo copy                          1     .0           0      20       0.0
    direct path read                      5,316     .0           0       0       0.3
    latch: row cache objects                  3     .0           0       1       0.0
    direct path write                     1,174     .0           0       0       0.1
    latch: library cache pin                  3     .0           0       0       0.0
    rdbms ipc message                    20,401   24.2      11,112     545       1.3
    Streams AQ: qmn slave idle w            489     .0       2,650    5420       0.0
    Streams AQ: waiting for time              9   55.6       1,790  198928       0.0
    pmon timer                              379   94.5       1,050    2771       0.0
    Streams AQ: delete acknowled            406   32.3       1,050    2586       0.0
    Streams AQ: qmn coordinator             470   33.8       1,050    2233       0.0
    smon timer                              146     .0       1,039    7118       0.0
    SGA: MMAN sleep for componen          3,928   99.3          35       9       0.3
    Operating System Statistics             DB/Inst: xxxx/xxxx  Snaps: 18085-18086
    Statistic                                       Total
    AVG_BUSY_TIME                                  68,992
    AVG_IDLE_TIME                                  37,988
    AVG_IOWAIT_TIME                                28,529
    AVG_SYS_TIME                                   11,748
    AVG_USER_TIME                                  57,214
    BUSY_TIME                                     552,209
    IDLE_TIME                                     304,181
    IOWAIT_TIME                                   228,489
    SYS_TIME                                       94,253
    USER_TIME                                     457,956
    LOAD                                                2
    OS_CPU_WAIT_TIME                      147,872,604,500
    RSRC_MGR_CPU_WAIT_TIME                              0
    VM_IN_BYTES                                    49,152
    VM_OUT_BYTES                                        0
    PHYSICAL_MEMORY_BYTES                  25,630,269,440
    NUM_CPUS                                            8
    NUM_CPU_SOCKETS                                     8

    mbobak wrote:
    So, this is a parsing related wait. You already mentioned that you're doing lots of parsing, mostly soft. Do you have session_cursor_cache parameter set to a reasonable value? 10g, I believe the default is 50, which is probably not a bad starting point. You may get additional benefits with moderate increases, perhaps to 100-200 range. It can be costly to do so, but can the extra parsing be addressed in the application? Is there anything you can do to reduce parsing in the application? When the problem occurs, how is the CPU consumption on the box? Are the CPUs pegged? Are you bottlenecked on CPU resources? Finally, there are bugs around 10.2.0.x and mutexes, so, you may want to open an SR w/ Oracle support, and determine if the root cause is actually a bug.
    Mark,
    I think you might read a little more into the stats than you have done - averaging etc. notwithstanding.
    There are 8.55 "hard" parses per second - which in 17.96 minutes is about 9,500 hard parses - and there are 1.3M pin S wait on X: which is about 130 per hard parse (and 1.9M pin S). So the average statistics might be showing an interesting impact on individual actions.
    The waits on "local write wait" are worth nothing. There are various reasons for this, one of which is the segment header block writes and index root block writes when you truncate a table - which could also be a cause of the "enq: RO - fast object reuse" waits in the body of the report.
    Truncating tables tends to invalidate cursors and cause hard parsing.
    So I would look for code that is popular, executed from a number of sessions, and truncates tables.
    There were some bugs in this area relating to global temporay tables - but they should have been fixed in 10.2.0.4.
    Regards
    Jonathan Lewis
    http://jonathanlewis.wordpress.com
    http://www.jlcomp.demon.co.uk
    To post code, statspack/AWR report, execution plans or trace files, start and end the section with the tag {noformat}{noformat} (lowercase, curly brackets, no spaces) so that the text appears in fixed format.
    There is a +"Preview"+ tab at the top of the text entry panel. Use this to check what your message will look like before you post the message. If it looks a complete mess you're unlikely to get a response. (Click on the +"Plain text"+ tab if you want to edit the text to tidy it up.)
    +"Science is more than a body of knowledge; it is a way of thinking"+
    +Carl Sagan+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Problems with cursor and shortcuts when using JNLP services on MAC OS X

    After invoking the JNLP services on a MAC I loose the ability to set the cursor and invoke keyboard shortcuts. On Windows this is not a problem, so I believe it is a bug and I have reported it to Apple. Meanwhile, I would appreciate if someone could help me with finding a work-around. To identify the problem run the following code with Java Web Start (i.e., you need to add the program to a jar and launch it using a JNLP script). You also need to include the javax.jnlp package.
    Observe that the cursor changes to cross-hairs when entering the circle. After invoking the Open file menu item, the cursor does not change any longer. Shortcut key do not work either, but if you open the menu and close it again without selecting any of the menu items, the shortcuts are OK again.
    package bugreport;
    import java.awt.*;
    import java.awt.event.*;
    import java.io.IOException;
    import javax.swing.*;
    import javax.jnlp.*;
    public class Demo2 extends JPanel implements Runnable, MouseMotionListener {
        private int centerX = 100;
        private int centerY = 100;
        private int radius = 50;
        public static void main(String[] args) {
            SwingUtilities.invokeLater(new Demo2());
        public void run() {
            int menuMask = Toolkit.getDefaultToolkit().getMenuShortcutKeyMask();
            final JFrame frame = new JFrame("Bug Demo");
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            setPreferredSize(new Dimension(200, 200));
            addMouseMotionListener(this);
            JMenuBar menuBar = new JMenuBar();
            frame.setJMenuBar(menuBar);
            //File menu
            JMenu fileMenu = new JMenu("File");
            fileMenu.setMnemonic('F');
            menuBar.add(fileMenu);
            //openMenuItem
            JMenuItem openMenuItem = new JMenuItem("Open...");
            openMenuItem.setMnemonic('O');
            openMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_O, menuMask));
            openMenuItem.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    openFile();
            fileMenu.add(openMenuItem);
            frame.add(this);
            frame.pack();
            frame.setResizable(false);
            frame.setVisible(true);
        @Override
        public void paintComponent(Graphics g) {
            g.clearRect(0, 0, getWidth(), getHeight());
            g.setColor(Color.BLUE);
            g.fillOval(centerX - radius, centerY - radius, 2 * radius, 2 * radius);
        public void mouseDragged(MouseEvent e) {
        public void mouseMoved(MouseEvent e) {
            int dx = e.getX() - centerX;
            int dy = e.getY() - centerY;
            if (dx * dx + dy * dy < radius * radius) {
                setCursor(Cursor.getPredefinedCursor(Cursor.CROSSHAIR_CURSOR));
            } else {
                setCursor(Cursor.getDefaultCursor());
        private void openFile() {
            FileOpenService fos = null;
            try {
                fos = (FileOpenService) ServiceManager.lookup("javax.jnlp.FileOpenService");
            } catch (UnavailableServiceException ex) {
                JOptionPane.showMessageDialog(this, "Service unavailable", "Open", JOptionPane.ERROR_MESSAGE);
            if (fos != null) {
                try {
                    FileContents fc = fos.openFileDialog(null, null);
                } catch (IOException ex) {
                    JOptionPane.showMessageDialog(this, "Service unavailable", "Open", JOptionPane.ERROR_MESSAGE);
    }Edited by: James_Vagabond on Oct 29, 2009 9:35 AM

    Barbara, Thanks very much taking the time to respond to my posting. Your input and directions were just what I needed.I accessed the print settings in the pull down menu, setup the print options including the color profile for Elements and the Printer to sRGB, and printed my picture. This resolved all the invalid color problems I was having, but I did notice that there was a hint of magenta overall in the picture. I had read an article that said to use Canon Color Matching instead of Color Sync to prevent that but I couldn't make that change in the pull down menu. I tried in the Presets dialog box but that didn't appear to be possible. Should I make that change as well?
    Also, in my travels through Elements 13 I notice under Edit->Color Settings that there were options for No Color Mgmt, Optimize for Screen, for Printing, or ability to chose one or the other (real time I assume). How do those options fit into this scenario?
    Thanks again

  • Continuing problem with cursor jumping and more!

    I had made a post about cursor jumping and thought I had solved the problem but it's back again with a twist. The cursor still jumps eratically in just about any program and will then settle down for awhile. What is also happening is the flyout tools in adobe photoshop and illustrator don't work properly or at all. I have tried trashing the preferences for illustrator and photoshop, repaired permissions, repaired the disk with disk utility- it says everything is fine. Now...... when I sartup off of my backup hard drive, everything is fine- cursor and all. Are there any ideas as to how I can solve the problem with my internal hard disk? I was told that I may have to wipe the hard disk clean and start over again. Are there any areas you can send me to that will help me do that?

    I have this problem even before running this set up updates (not sure what version) so I have a hunch it may not be related to those updates (but not sure)..
    .it started whem mine was new a few months ago and I am using a T410s....however  I am also running win 7 64bit....
    I did re-ren the windows touchpad calibration and it seemed to get better (NOT CONCLUSIVE) as it is intermitant and just started again...it would happen often for spurts then stop (Few days happening often)...when I am in hotel rooms or places with steam it seemed to happen more (not sure if coincidence)...I did run the tablet input calibration in the control panel but not sure if it fixes it...I don't know if it is softare or hardware and it is very anoying and intermitant...exact same things....cursor jumps to right corner and tablet keyboard shows up in left corner even though no touch...and it closes some apps...as that is where the X is....if you find anything PLEASE let me know...thanks

  • My cursor isn't working on Firefox so I can't scroll down - I must manually hold vertical bar to move page - I've already tried troubleshooting - helped temporarily, but still problem now - cursor otherwise works on other servers

    My cursor isn't working on Firefox, so I can't scroll down - I must manually hold the vertical bar to move page.

    I have had this nagging problem several times. Each time more frustrating than the last.
    '''PDF''''s. If you have a .pdf page open in Firefox (as often happens when looking at brochures and whatnot from websites) the mousepad side scroll function will not work. Plugging in an external usb device works just fine, making the situation that much more aggravating.
    Simply close any windows or tabs from Firefox that are displaying .pdf's, and the blood pressure "should" return to normal values. If your blood pressure doesn't return to a satisfactory value, see your family doctor. He'll probably ensure your continued trust in Firefox is still better than any experience with explor.er.

  • Procedure Problem - Open Cursor for SQL

    in my form I added a procedure. this is working fine in SQL but when I try to run through form it gives error.
    Code of Procedure:-
    PROCEDURE Proc_Purchase_all IS
    BEGIN
      declare
         v_sql varchar2(4000);
         v_user varchar2(30);
         v_sep varchar2(20);
         v_cur SYS_REFCURSOR;
       pur_rec    purchase%ROWTYPE;
       begin
         for u in (SELECT * FROM ALL_TABLES WHERE OWNER LIKE 'BMP%' and table_name ='PURCHASE') loop
           v_sql := v_sql || v_sep || 'SELECT * from '||u.owner||'.purchase';
          v_sep := ' UNION ALL ';
        end loop;
        open v_cur for v_sql;
      Loop
      Fetch v_cur into pur_rec;
      Exit when v_cur%NOTFOUND;
      --DBMS_OUTPUT.PUT_LINE (PUR_REC.S_CODE||' '||Pur_rec.s_name);
      End Loop;
        close v_cur;
    end;
    END;Error Line
    * open v_cur for v_sql;*
    Error is :-
    Encountered the symbol 'V_SQL' when expecting one of the following.
    select
    Encountered the symbol END when expecting one of the following.
    Begin function package pragma procedure external

    I changed my code ALSO Showing SAME error .
    SQL> Declare 
      2    v_sql varchar2(4000);
      3       v_user varchar2(30);
      4       v_sep varchar2(20);
      5    TYPE R_CURSOR IS REF CURSOR RETURN purchase%ROWTYPE;
      6       C_Pur R_CURSOR;
      7       ER C_pur%ROWTYPE;
      8       BEGIN
      9    for u in (SELECT * FROM ALL_TABLES WHERE OWNER LIKE 'BMP%' and table_name ='PURCHASE') loop
    10         v_sql := v_sql || v_sep || 'SELECT * from '||u.owner||'.purchase';
    11        v_sep := ' UNION ALL ';
    12      end loop;
    13   OPEN C_Pur FOR V_sql;
    14       LOOP
    15       FETCH C_Pur INTO ER;
    16      EXIT WHEN C_Pur%NOTFOUND;
    17    
    18      END LOOP;
    19      CLOSE C_Pur;
    20     END; 
    21  /
    OPEN C_Pur FOR V_sql;
    ERROR at line 13:
    ORA-06550: line 13, column 7:
    PLS-00455: cursor 'C_PUR' cannot be used in dynamic SQL OPEN statement
    ORA-06550: line 13, column 2:
    PL/SQL: Statement ignoredEdited by: Ahmed on Jan 13, 2011 1:58 AM

  • Data Transfer problem from cursor to table

    Hi ,
             I created one Extract FM to extract data through a Datasource by RAS3. When i run the FM directly  the cursor value (S_CURSOR) is displayed as 3850 and when i try to transfer using FETCH NEXT to a internal table (E_T_DATA) 498  entries populated but if i open the table all lines are blank. Pls help me. i.e. E_T_DATA[] = 498
    OPEN CURSOR WITH HOLD S_CURSOR FOR
        SELECT MATNR
        FROM MARA AS A "INNER JOIN MARC AS C
        "ON A~MATNR = C~MATNR
        "INTO TABLE E_T_DATA
        WHERE MATNR IN L_R_MATNREAN
          AND MTART IN ('ZPLU','ZPAK',
                          'ZCOM','ZTIN',
                          'ZSCR','ZEXW',
                          'ZCOU','ZGVR')
          AND EAN11 = ''
          AND ATTYP = '00'.
    FETCH NEXT CURSOR S_CURSOR
                 APPENDING CORRESPONDING FIELDS
                 OF TABLE E_T_DATA
                 PACKAGE SIZE S_S_IF-MAXSIZE.
      IF SY-SUBRC <> 0.
        CLOSE CURSOR S_CURSOR.
        RAISE NO_MORE_DATA.
      ENDIF.

    first of all you have to put your FETCH into a DO ... ENDDO

  • Problem with CURSOR on Selection-Screen

    Hi Experts,
    This question is for you. We have recently upgraded our system to 7.01 Stack 5 (Enhancement Pack 1).
    The screen supplied by a custom transaction is quite behaving in a strange manner. Whenever we execute the transaction the CURSOR appears by default at the 3rd Radio button and the UP/DOWN keys present in keyboard are not working and we have to place it back to the correct position using Mouse.Our customer raised a Ticket to check this.
    Please suggest a work around for this.I need to remove this cursor blink completely at the selection screen.
    Best Regards,
    lakshman.

    Hi,
    Not sure to really get the issue... looks like your radiobuttons are not grouped properly and default is set on the third one...(?)
    So just use the same radiobutton group for the three buttons and set the first one as default, either on selection screen or initialization level...
    Kr,
    Manu.

  • Problem with cursors in JDBC

    Hi,
    I'm new to JDBC.
    I'm trying to insert data into an Oracle database.
    I'm using the prepare statement and the update to commit the transaction.
    But after inserting about a 100 rows into the database, it gives an exception that the max limit on cursors was reached.
    Can anyone tell me how to work around this?
    Vishal.

    Note that it's a good idea to close objects such as
    statements, resultsets and your connection in aCreating a new connection is an expensive action, so it is not a good idea to close the connection after each statement execution. You should use a connection pool which manages connections to the database. The connection pool is built when your application starts, and during the program execution you can access the connections available in the pool without creating and destroying new connections every time you need to perform a database command.

Maybe you are looking for