Help!About HotKeys

I need help!!
Now, i want to make an application with several hotKeys in JFrame.My source like this:
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import javax.swing.border.*;
import java.util.*;
public class Demo extends JFrame {
public Demo () {
try {
jbInit();
catch(Exception e) {
e.printStackTrace();
private void jbInit() throws Exception {
this.enableEvents(AWTEvent.KEY_EVENT_MASK);
getContentPane().setLayout(null);
closeBtt.setBounds(new Rectangle(0, 13, 19, 40));
closeBtt.setBorder(new TitledBorder(""));
closeBtt.setHorizontalAlignment(SwingConstants.LEFT);
closeBtt.setHorizontalTextPosition(SwingConstants.LEFT);
closeBtt.setMargin(new Insets(0, 0, 0, 0));
closeBtt.setMnemonic('0');
closeBtt.setText("X");
closeBtt.setVerticalAlignment(SwingConstants.TOP);
closeBtt.setVerticalTextPosition(SwingConstants.TOP);
this.setEnabled(true);
templateLab.setText("template");
templateLab.setBounds(new Rectangle(23, 25, 80, 17));
templateCB.setBounds(new Rectangle(103, 23, 109, 21));
codeLab.setText("name");
codeLab.setBounds(new Rectangle(225, 26, 33, 17));
codeTxt.setBounds(new Rectangle(266, 23, 63, 21));
setBtt.setBounds(new Rectangle(340, 20, 79, 27));
setBtt.setBorder(new TitledBorder(""));
setBtt.setText("set");
getContentPane().add(templateCB, null);
getContentPane().add(codeTxt, null);
getContentPane().add(setBtt, null);
getContentPane().add(closeBtt, null);
getContentPane().add(templateLab, null);
this.getContentPane().add(codeLab, null);
protected void processKeyEvent(KeyEvent evt) {
super.processKeyEvent(evt);
if(evt.getKeyCode() == KeyEvent.VK_F4){
System.out.println("AAAA");
public static void main(String[] args) {
try {
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
} catch(Exception e) {
Demo demo = new Demo();
demo.setBounds(50,50,479, 80);
demo.show();
private JButton closeBtt = new JButton();
private JLabel templateLab = new JLabel();
private JComboBox templateCB = new JComboBox();
private JLabel codeLab = new JLabel();
private JTextField codeTxt = new JTextField();
private JButton setBtt = new JButton();
when i clicked the F4 button, i can not catch the KeyEvent. "AAAA" is not printed.
What problem with my program?
help me, plz
thank u
BTW, if i remove all the components from JFrame except label, "AAAA" will be printed.
i used JDK1.4.0,JDK1.4.01 and JDK1.4.1beta, all are no response, but jdk1.3.1 can run my demo.
Now, i must use jdk1.4.0 or more higher version.how can i resolve it?

Personally I'd recommend throwing away JBuilder's UI builder for a start - these things usually they generate appalling code!
The code you've got seems to use the AWT inheritance event model that was abandoned around JDK1.1, being replaced by the delegation model.
Anyway, I'd advise doing this by registering a keyboard action with your JFrame:
ActionListener hotKeyAction = new ActionListener()
  public void actionPerformed(ActionEvent e)
    System.out.println("AAAA");
getRootPane().registerKeyboardAction(hotKeyAction, KeyStroke.getKeyStroke("F4"), WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);Hope this helps.

Similar Messages

  • HELP about analog output video

    Hello, I´m need help about analog output video in Premiere CS5 using Matrox RTX2. I need to crop a video with resolution in 1440x1080 to 4:3 in output analog. But what happens is wrong (I think). My video is in format anamorphic and the other option is 16:9 letterbox. Is there any way to crop the video without using effects. Thanks a Lot and sorry my bad english (my native language is Portuguese).

    There are no 4:3 HD specifications.  You'll have to put the video into a normal SD sequence, and scale it down till the top and bottom of the video meet the frame.  That way the sides will be cut off.

  • Help about Warning Security IE 8.0

    Hello Guys,
    I need help about warning security IE 8.0.
    When I try install a software from my webserver is display the following message:
    I can't check the publisher.Are you sure install the software?
    This file does not have a valide digital signature that verifies its publisher.
    You should only install software from publishers you trust.
    Well, I already enable:
    Download signed ActiveX controls
    Download unsigned ActiveX controls
    Allow active content from CDs to run on user machines Enabled 
    Allow software to run or install even if the signature is invalid Enabled 
    Check for server certificate revocation Disabled 
    Check for signatures on downloaded programs Disabled 
    Is there somewhere I disable all settings warning's about IE or one specific GPO I need disable for this warning don't display for me?
    In the same installation a lot of about file .cab are installed, only one specifc I don't have sucess.
    I try some troubleshootings too:
    https://social.technet.microsoft.com/Forums/windows/en-US/8f8293c4-0920-462f-9c69-0a8e3f92aa02/unknown-publishers-warning
    https://www.youtube.com/watch?v=UknQn6tZZis
    http://windows-3322.blogspot.com.br/2011/02/how-to-repair-activex-error.html
    Thanks a lot who answer me or about any idea about my issue.

    This file does not have a valide digital signature that verifies its publisher.
    Did you see your result
    https://social.technet.microsoft.com/Forums/windows/en-US/8f8293c4-0920-462f-9c69-0a8e3f92aa02/unknown-publishers-warning
    <quote>
    Changing the time zone actually worked.
    </quote>
    Robert Aldwinckle

  • I installed teh update a few days ago but when I open Firefox it says :"You're not on the lastest version . . ", but at "Help" & "About Firefox" it shows 9.0.1 "latest release". There's a glitch somewhere.

    This is the message when I Open Firefox:
    "You're not on the latest version of Firefox. Upgrade today to get the best of the Web!"
    At <Help> & <About Firefox>, it shows
    Firefox
    9.0.1
    "Firefox is up to date"
    "You are currently on the release update Channel"
    One of those messages must be wrong. Either way Firefox seems to work fine otherwise. Thanks and regards, Peter Spielman

    Is your homepage set to www.google.com/firefox? If so, that page is wrong. You should change your home page to about:home or some other site instead. The google.com/firefox page is no longer supported.

  • I have three user accounts on one computer. On only one account when I when I check Help - About fire fox only one user account says apply update and won't apply. The other two work fine.

    One of three user accounts on the same computer appears to not be updating to 8.0.1 correctly. One admin and one none admin user account says it is up-to-date. The other non-admin user account, under Help About Firefox says apply update, but won't.

    As long as you installed MS Office into its default location (the top level /Applications folder) it will be available to all user accounts on the Mac.
    As far as licensing is concerned you only have to enter the license code once, which you should do right after installing MS Office, in the same admin account you installed it from, by opening any one of the MS Office applications.  There is no additional licensing required for additional user accounts on the same Mac.
    Each user account is able to run the Office apps.  The only thing you will have to do is go through an initial setup screen in each user account (but this setup does NOT involve entering any additional license codes).
    You may have problems if you installed MS Office in a particular user account (i.e. NOT in the top level /Applications folder).

  • Not able to view Forms Server version in Help: About Oracle Applications after the forms upgrade 10.1.2.3.0

    Hi all,
    DB:11.2.0.3.0
    EBS:12.1.3
    O/S: Sun Solaris SPARC 64 bits
    I am not able to view Forms Server version in Help: About Oracle Applications after the forms upgrade 10.1.2.3.0 after the forms upgrade 10.1.2.3.0 as per note:Upgrading OracleAS 10g Forms and Reports to 10.1.2.3 (437878.1)
    Java/jre upgraded to 1.7.0.45 and JAR files regenerated(without force option). Able to opne forms without any issues.
    A)
    $ORACLE_HOME/bin/frmcmp help=y
    FRM-91500: Unable to start/complete the build.
    B)
    $ORACLE_HOME/bin/rwrun ?|grep Release
    Report Builder: Release 10.1.2.3.0 - Production on Thu Nov
    28 14:20:45 2013
    Is this an issue? Could anyone please share the fix if faced the similar issue earlier.
    Thank You for your time
    Regards,

    Hi Hussein,
    You mean reboot the solaris server and then start database and applications services. We have two databases running on this solaris server.
    DBWR Trace file shows:
    Read of datafile '+ASMDG002/test1/datafile/system.823.828585081' (fno 1) header failed with ORA-01206
    Rereading datafile 1 header failed with ORA-01206
    V10 STYLE FILE HEADER:
            Compatibility Vsn = 186646528=0xb200000
            Db ID=0=0x0, Db Name='TEST1'
            Activation ID=0=0x0
            Control Seq=31739=0x7bfb, File size=230400=0x38400
            File Number=1, Blksiz=8192, File Type=3 DATA
    Tablespace #0 - SYSTEM  rel_fn:1
    Creation   at   scn: 0x0000.00000004 04/27/2000 23:14:44
    Backup taken at scn: 0x0001.db8e5a1a 04/17/2010 04:16:14 thread:1
    reset logs count:0x316351ab scn: 0x0938.0b32c3b1
    prev reset logs count:0x31279a4c scn: 0x0938.08469022
    recovered at 11/28/2013 19:43:22
    status:0x2004 root dba:0x00c38235 chkpt cnt: 364108 ctl cnt:364107
    begin-hot-backup file size: 230400
    Checkpointed at scn:  0x0938.0cb9fe5a 11/28/2013 15:04:52
    thread:1 rba:(0x132.49a43.10)
    enabled  threads:  01000000 00000000 00000000 00000000 00000000 00000000
    Hot Backup end marker scn: 0x0000.00000000
    aux_file is NOT DEFINED
    Plugged readony: NO
    Plugin scnscn: 0x0000.00000000
    Plugin resetlogs scn/timescn: 0x0000.00000000 01/01/1988
    00:00:00
    Foreign creation scn/timescn: 0x0000.00000000 01/01/1988
    00:00:00
    Foreign checkpoint scn/timescn: 0x0000.00000000 01/01/1988
    00:00:00
    Online move state: 0
    DDE rules only execution for: ORA 1110
    ----- START Event Driven Actions Dump ----
    ---- END Event Driven Actions Dump ----
    ----- START DDE Actions Dump -----
    Executing SYNC actions
    ----- START DDE Action: 'DB_STRUCTURE_INTEGRITY_CHECK' (Async) -----
    Successfully dispatched
    ----- END DDE Action: 'DB_STRUCTURE_INTEGRITY_CHECK'
    (SUCCESS, 0 csec) -----
    Executing ASYNC actions
    ----- END DDE Actions Dump (total 0 csec) -----
    ORA-01186: file 1 failed verification tests
    ORA-01122: database file 1 failed verification check
    ORA-01110: data file 1:
    '+ASMDG002/test1/datafile/system.823.828585081'
    ORA-01206: file is not part of this database - wrong
    database id
    Thanks,

  • How to Disable Check for updates button in Help/About in firefox 5.0

    Hi the user should not manually check for updates so we want to disable the Check for updates button also in Help/About.
    Thanks in advanced

    You can hide that button with code in userChrome.css below the @namespace line.
    * http://kb.mozillazine.org/userChrome.css
    * http://kb.mozillazine.org/Editing_configuration
    You can use the ChromEdit Plus or Stylish extension to have easier access to the customization files.
    * ChromEdit Plus: http://webdesigns.ms11.net/chromeditp.html
    <pre><nowiki>@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); /* only needed once */
    #aboutDialog #updateBox { display:none!important; }</nowiki></pre>
    You can also choose to lock the related update pref(s) to false if you want to make sure.
    See:
    * http://kb.mozillazine.org/Locking_preferences
    * http://kb.mozillazine.org/about:config

  • Help about W2K Apache plug-in for WLS

    Hi,everybody.
    I want to use the W2K apache http server for redirect the dynamic request to
    WLS. But i don't have the corresponding plug-in. Who can help me? or Who can
    give me some hint about this?
    Thanks in advance.
    BR
    Steven Zhao

    Hi Steven,
    as far as I know there is no Apache Plugin for Windows Platform. Your
    choice is either Unix->Apache or Windows->IIS. I think there is a
    Netscape Plugin as well, but I don't know for which platforms.
    Daniel
    -----Original Message-----
    From: Steven Zhao [mailto:[email protected]]
    Posted At: Friday, October 20, 2000 6:02 AM
    Posted To: management
    Conversation: Help about W2K Apache plug-in for WLS
    Subject: Help about W2K Apache plug-in for WLS
    Hi,everybody.
    I want to use the W2K apache http server for redirect the dynamic
    request to
    WLS. But i don't have the corresponding plug-in. Who can help me? or Who
    can
    give me some hint about this?
    Thanks in advance.
    BR
    Steven Zhao

  • Need help about Hidden Markov Model model

    I want to make classification for EEG signal using Hidden Markov Model
    algorithm based on neural network.
    plz need help about how to implement this algorithm using LABVIEW.
    if not I want another thing to make classification.
    any one know information about this topic, send me a reply
    thanks

    Have you derrived the HMM that you want to implement?
    If so, post the algorithm and we can provide comments on how to implement it using LabVIEW.
    Message Edited by Ray.R on 04-12-2010 12:54 PM

  • Help about location based classes

    Helo. i need some help about location classes(i use J2ME). i want to develop a gps compass application. when i connected to gps, orientation is shown on a compass.(for example if i go to northeast direction, compass indicator shows the direction between nort and east).
    I made connecting GPS. Now i must draw a compass and show the direction informations on it. For doing this, which location classes i can use?
    (i do search about this,but i didn't decide which class i should use. I thought that i can use Orientation class for this. I found a source code and tried it. According to this snippet source code about orientation class, my phone doesn't support Orientation class.But i found an application about gps compass, it works on phone. )

    i write this question CLDC{MIDP part.
    Thanks...                                                                                                                                                                                                               

  • How do i see what beta ver i'm at - deeper than Help | About Firefox - registry .. ?

    i am enrolled in the beta channel but because the notification popups are so quick i someties do not see that a new beta ver is available. i consult filehippo regularly to see what updates are out there but i want to have a way i can find what beta i'm at - Help|About Firefox doesn't get it - how can i find that? looked in registry but haven't found what i want
    any idees?
    ciao
    saw

    I'm not trying to discredit your work. But I did actually read the workaround and it is valid. That is true. But still that's not an answer to my question nor an explanation for that design choice. It's a workaround for a software not displaying the exact version.
    So why not jump in this thread if it exists? Why create a new thread with the same question? Also to apply your logic, why didn't anybody tell the user to use the stable version if he's incapable of figuring out the obvious?

  • Which file in Omni.ja contains the version number in HELP | ABOUT

    We are using Firefox in a corporate locked down environment.
    we have made a number of changes to files in the OMNI.JA file to configure Firefox accordingly.
    We now have a newer version of firefox to install/package however, when we replace the default omni.ja file in FF 10.0.10 and go into HELP | ABOUT it shows the version number of FF that the omni.ja file came from, ie 10.0.4.
    Which file(s) need to be replaced in omni.ja so that when we select HELP | ABOUT it shows the correct version of 10.0.10 ?
    regards
    Bill

    hello biffal, which changes to the omnia.ja file have you done originally? maybe there's a better way to do it, because this file will be overwritten by each & every firefox update...

  • 9.5.3 Help / About reports version as 9.0.0

    After downloading AcrobatUpd953_all_incr.msp, installing it to patch Acrobat from 9.5.2 to 9.5.3, and rebooting, when I select Help / About in Acrobat, the dialog shows the version of Acrobat as 9.0.0. When I open Control Panel / Programs and Features, it shows the version of Acrobat as 9.5.3, when I look at the properties of acrobat.exe the file version is 9.5.3.305, and in Acrobat if I open Help / About Adobe Plugins, all the plugin versions are shown as 9.5.3.305. So it looks as though it's just the About dialog that is screwed.
    I checked with a friend who also has Acrobat 9, and he sees exactly the same bug. OS on both machines is Windows 7 x64.

    I tried this on my Win7 64 bit machine and its working fine.Please try repairing your Acrobat from control panel and see if it works.

  • Change info displayed on splash screen Help-- About

    When I open NI Multisim and click on Help-->About, the splash screen displays the following information in the upper left hand corner of the splash screen:
    test
    Benjamin Franklin Institute
    Serial#
    How/where do I change the word "test" so that it doesn't appear on all the classroom PCs?  Where is the source of the identifying information that appers on the splash screen?
    Thanks.

    Hello,
    In this case “test” is making reference to the Register Owner. This information is requested during the installation process. You will be able to modify this information by modifying a key in the Windows Registry.  Please refer to the link below for more information.
    http://digital.ni.com/public.nsf/allkb/0385A6FBAADE844286256DDB0066FCE8?OpenDocument
    Regards,
    MCOTO

  • Why no indication of 5.0.1 on Help About Firefox?

    I had 5.0 installed a check of Help About Firefox showed it as up to date. Checking FileHippo.com showed 5.0.1, How come no indication of this in Help About Firefox?
    Thanks

    It is because Firefox 5.0 is still the current update for Windows and Linux users as the 5.0.1 was really only for to have a couple work around's for Mac OSX users as in a font issue for OSX 10.7 that may crash Firefox and a Java plugin loading issue on OSX 10.5. ([https://support.mozilla.com/en-US/forums/contributors/707078 They say OSX 10.6 but really meant OSX 10.5])
    FileHippo was not aware it was only really for MAC OSX.
    http://christian.legnitto.com/blog/2011/07/12/why-are-there-no-firefox-5-0-1-and-3-6-19-automatic-updates-for-windows-and-linux/

  • I've purchased an in-app purchase recently, which was a magazine issue, the problem is that I can't find it in the app! Any help about that?

    I've purchased an in-app purchase recently on my iPad, which was a magazine issue, the problem is that I can't find it in the app! Any help about that? The app is called Forbes Middle East

    Change your iTS password!!!!
    Are these charges from Adobe or Apple?
    Are these purchases from the App Store or iTunes Store?
    Contact your credit card company and dispute the charges. Apple and Adobe will do nothing for you - it is your CC issuer that can help.
    As noted these are user to user discussions. None of us here work for Apple or Adobe.
    Contact iTS Customer Service via these links - http://www.apple.com/support/itunes/
    MJ

Maybe you are looking for

  • User profiles from Active directory when loggedin then userdisplay, useredit shows blank white screen in SharePoint 2013

    User profiles from Active directory when loggedin then userdisplay, useredit shows blank white screen in SharePoint 2013  I can login with the these AD users and AD direct import is working just fine. We are not using UPS. With admin user when I clic

  • How do I Access Data in XML Connector

    I have an XMLConnector attached to a xml file and bound to a label. This is working fine. My question is: How do I access the data values in a component or the XMLConnector through actionscript. I can see the values in their components so I know the

  • Distiller hangs: OffendingCommand: ÐÏࡱá

    Distiller 5.0 hangs halfway through task. The output is: Start Time: 13 July 2008 at 21:26 Destination: C:\Abc.pdf Source: Abc.doc %%[ Error: undefined; OffendingCommand: ÐÏࡱá ]%% %%[ Flushing: rest of job (to end-of-file) will be ignored ]%% %%[ W

  • Download jar / java class from database

    Hello, I have database 10.2.0.3 with one procedure that calls some java class loaded in database. Unfortunately I don't have source code of that java class or whole jar that was loaded into database. I would like to download it from database and try

  • Can't deactivate iMessage after switching phones?

    I bought an Android phone tonight, replacing my iPhone.  I also ported my number to the new phone.  However, now, anytime someone with an iPhone tries to SMS me, their phone automatically sends it as an iMessage, which I can't receive, since I no lon