Results 1 to 4 of 4
  1. #1
    newbie_tiwari is offline Member
    Join Date
    Jun 2012
    Posts
    7
    Rep Power
    0

    Question How to use getKeyStroke

    Hi Guyz,
    I not in coding but need to do some of the coding part for my project..
    Facing a problem in one scenario, where on clicking a link a dialogbox opens asking for opening a pdf file... clicking on yes button a pdf file opens,,,, what my problem is like i need to close that pdf file but it is getting minimized instead of getting close.
    i tried with close();
    exit();
    but its not working so i thought of using Keystroke thing.. now here i am doing CTRL+Q, with the help of a below mention code but still facing a error (the method getkeystroke(int,int) is undefined )...
    getKeyStroke(KeyEvent.VK_Q, InputEvent.CTRL_MASK );



    Could u pls tell me how to resolve this error...
    i imported all these...but still getting same error...

    import javax.swing.KeyStroke;
    import java.awt.event.ActionEvent;
    import java.awt.event.InputEvent;
    import java.awt.event.KeyEvent;



    PLS HELP ME... URGENT!!

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Moderator
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    9,918
    Rep Power
    16

    Default Re: How to use getKeyStroke

    Why do they call it rush hour when nothing moves? - Robin Williams

  3. #3
    newbie_tiwari is offline Member
    Join Date
    Jun 2012
    Posts
    7
    Rep Power
    0

    Default Re: How to use getKeyStroke

    Thank you DarrylBurke.. and yeah thanks for the link " How to ask questions the smart way "
    but the person who don't know the ABC of java definitely can't ask questions so smartly about java den other ppl.


    But thank u so much.... in future i'll try my best in explaining u my problem.



    KeyStroke (Java 2 Platform SE v1.4.2)

  4. #4
    DarrylBurke's Avatar
    DarrylBurke is offline Moderator
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    9,918
    Rep Power
    16

    Default Re: How to use getKeyStroke

    Quote Originally Posted by newbie_tiwari View Post
    ... den other ppl.
    Certainly doesn't look like you went through that page.

    db
    Why do they call it rush hour when nothing moves? - Robin Williams

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •