Results 1 to 3 of 3
  1. #1
    sukatoa's Avatar
    sukatoa is offline Senior Member
    Join Date
    Jan 2008
    Location
    Cebu City, Philippines
    Posts
    556
    Rep Power
    7

    Default How to add a shortcut key from JTextArea

    I would like to add action keys like ctrl S for save and etc...

    I have no idea how to implement it...

    I saw a thread here, button with a keystroke...
    But, It uses only a button, with a focus in panel....

    Can anyone show me an algorithm or implementation or guide in JTextArea with a shortcut key?

    What built-in methods should i use?
    Or anything that could help me implement with this one....


    Java inspired,
    Sukatoa.....

  2. #2
    CaptainMorgan's Avatar
    CaptainMorgan is offline Moderator
    Join Date
    Dec 2007
    Location
    NewEngland, US
    Posts
    835
    Rep Power
    8

    Default

    You're going to want to look into mnemonics, start there. :)
    Vote for the new slogan to our beloved Java Forums! (closes on September 4, 2008)
    Want to voice your opinion on your IDE/Editor of choice? Vote now!
    Got a little Capt'n in you? (drink responsibly)

  3. #3
    sukatoa's Avatar
    sukatoa is offline Senior Member
    Join Date
    Jan 2008
    Location
    Cebu City, Philippines
    Posts
    556
    Rep Power
    7

    Default I got it....

    Using addJMenuBar....

    Thanks for the guide bro...

Similar Threads

  1. Undo shortcut malfunctioning.
    By Eranga in forum NetBeans
    Replies: 0
    Last Post: 03-31-2008, 06:12 AM
  2. JTextArea
    By saytri in forum New To Java
    Replies: 0
    Last Post: 01-13-2008, 02:07 AM
  3. shortcut of System.out.println() without netbeans
    By VipinKeshri in forum New To Java
    Replies: 1
    Last Post: 11-18-2007, 10:24 AM
  4. Eclipse - shortcut to System.out.println
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 11-07-2007, 05:21 PM
  5. System.out.println shortcut
    By ravian in forum Eclipse
    Replies: 2
    Last Post: 11-07-2007, 11:17 AM

Posting Permissions

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