JTextArea + KeyListener = hangs the VM!

Ok, I have a weird bug for one of my users.
In the application when the user presses one of the "���" (swedish) characters on the keyboard in the JTextArea it hangs the VM. Makes the whole vm instance locked on the operating system (and the whole application ofc). The program is a java application running through java web start. JRE 1.5.0_09
This has been reported to happen randomly on other computers as well.
If i do not add the key listener to the jtextarea it does not hang! Here is the code for the keylistener I add, which makes the application hang.
this.addKeyListener(new KeyAdapter(){
     public void keyPressed(KeyEvent e){
          switch (e.getKeyCode()) {
               case KeyEvent.VK_ENTER :
                    System.out.println("Enter pressed");
                    break;
});Anyone have any clue what can be causing this?

>>
this.addKeyListener(new KeyAdapter(){
     public void keyPressed(KeyEvent e){
          switch (e.getKeyCode()) {
               case KeyEvent.VK_ENTER :
                    System.out.println("Enter pressed");
                    break;
>I don't think the problem is in that part of the code.......
becoz with your code this program is working properly......
import javax.swing.*;
import java.awt.event.*;
public class forJAeon extends JFrame{
    JTextArea jta;
    forJAeon(){
        setDefaultCloseOperation(EXIT_ON_CLOSE);
        jta=new JTextArea();
        jta.addKeyListener(new KeyAdapter(){
             public void keyPressed(KeyEvent e){
                  switch (e.getKeyCode()) {
                       case KeyEvent.VK_ENTER :
                          System.out.println("Enter pressed");
                        break;
        getContentPane().add(jta);
        setSize(200,200);
    public static void main(String args[]){
        new forJAeon().setVisible(true);
}???????so, the problem might be in some other place is my guess.....!!!
Tried using keybinding and it gives the same bug. Seems like it bugs on other computers as well. Supports my guess.....?!!??!!

Similar Messages

  • Crystal report close button hangs the application

    Dear All,
    I am working on 2005 B PL 46. we have developed an application to open a particular crystal report when a button is pressed in AR Invoice form. this works fine and the data is loaded properly. The problem is, when I close this report, this hangs the entire application and I have to kill the exe from the task manager then only I can go back to SAP. (one of the oldest problem we encountered with crystal report-SDK). this does not happen always. it does close the report 5 times out of 10 without hanging the application.one more thing is, if I debug the application with pressing F11, it never hangs the application and woks fine.
    The report is getting loaded in the Crystalreport Viewer control dragged on a windows form. any one has any idea? I have tried this on 2007 B version PL 08 and the same problem persists with lesser frequency.
    Thanks,
    Binita

    Yes Vasu. and on form close event of that windows's form, I am writing :
    System.Windows.Forms.Application.ExitThread()
    any idea?
    thanks,
    Binita

  • How do I make a JTextArea invisible to the mouse?

    Consider the applet below. There is a small JTextArea sitting in the glass pane. There are 3 JButtons sitting in a JPanel that is sitting in the content pane. One is completely under the JTextArea, one is half in and half out, & the last is completely outside it (at least I hope thats what it looks like on your machine.) The idea is when you click the disable button the JTextArea is disabled and you can click on the button that's underneath it.
    But it doesn't work that way. even when the JTextArea is disabled the mouse still cant click through it.
    Is there some way to make the JTextArea completely invisible to the mouse so I can click through it? I know setVisible(false) on the glass panel will work but I only want it to be invisible to the mouse, not my eyes.
    Thanks.
    /*  <applet code="MyTest14" width="400" height="100"></applet>  */
    // testing glass panes
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.image.*;
    import javax.swing.*;
    public class MyTest14 extends JApplet implements MouseListener
    TextPanel textPanel;
    JPanel buttonPanel;
    JButton underButton, enableButton, disableButton;
    JTextArea jta;
    public void init()
      Container contentPane = getContentPane();
      contentPane.setLayout(new FlowLayout());
      contentPane.setBackground(Color.WHITE);
      underButton = new JButton("Under textarea");
      underButton.addMouseListener(this);
      enableButton = new JButton("Enable textarea");
      enableButton.addMouseListener(this);
      disableButton  = new JButton("Disable textarea");
      disableButton.addMouseListener(this);
      buttonPanel = new JPanel(new BorderLayout());
      buttonPanel.add(underButton, "West");
      buttonPanel.add(enableButton, "Center");
      buttonPanel.add(disableButton, "East");
      jta = new JTextArea();
      jta.setPreferredSize(new Dimension(200,80));
      jta.setOpaque(false);
      jta.setLineWrap(true);
      jta.setWrapStyleWord(true);
      textPanel = new TextPanel();
      textPanel.setLayout(new FlowLayout(FlowLayout.LEFT));
      textPanel.add(jta);
      jta.setBorder(BorderFactory.createLineBorder(Color.black));
      contentPane.add(buttonPanel);
      setGlassPane(textPanel);
      textPanel.setVisible(true);
    public void mouseClicked(MouseEvent e)
      if (e.getSource() == enableButton) { jta.setEnabled(true); }
      else if (e.getSource() == disableButton) { jta.setEnabled(false); }
      else if (e.getSource() == underButton) { System.out.println("You reached the under button!"); }
    public void mouseExited(MouseEvent e) {}
    public void mouseEntered(MouseEvent e) {}
    public void mouseReleased(MouseEvent e) {}
    public void mousePressed(MouseEvent e) {}
    class TextPanel extends JPanel
      public TextPanel()
       super();
       setOpaque(false);
      public void paintComponent(Graphics g) { super.paintComponent(g); }
    }

    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class Test extends JFrame {
      Container content = getContentPane();
      JButton jb = new JButton("Press"), disenable = new JButton("Enable");
      JTextArea jta = new JTextArea("Now is the time for all google men to come to the aid of their browser");
      public Test() {
        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        JPanel jp = new JPanel();
        content.add(jp, BorderLayout.CENTER);
        jp.add(jb);
        jb.addActionListener(new ActionListener() {
          public void actionPerformed(ActionEvent ae) { System.out.println("Click!"); }
        jta.setLineWrap(true);
        jta.setWrapStyleWord(true);
        jta.setOpaque(false);
        jta.setEnabled(false);
        JScrollPane jsp = new JScrollPane(jta);
        jsp.setOpaque(false);
        jsp.getViewport().setOpaque(false);
        jsp.setPreferredSize(new Dimension(130,130));
        JPanel glass = (JPanel)getGlassPane();
        glass.add(jsp);
        glass.setVisible(true);
        jta.addMouseListener(new MouseListener() {
          public void mouseReleased(MouseEvent me) { mousy(me); }
          public void mouseClicked(MouseEvent me) { mousy(me); }
          public void mouseEntered(MouseEvent me) { mousy(me); }
          public void mouseExited(MouseEvent me) { mousy(me); }
          public void mousePressed(MouseEvent me) { mousy(me); }
        content.add(disenable, BorderLayout.SOUTH);
        disenable.addActionListener(new ActionListener() {
          public void actionPerformed(ActionEvent ae) {
            jta.setEnabled(!jta.isEnabled());
            disenable.setText(jta.isEnabled()?"Disable":"Enable");
        setSize(200,200);
        setVisible(true);
      void mousy(MouseEvent me) {
        if (jta.isEnabled()) return;
        Point p = SwingUtilities.convertPoint((Component)me.getSource(), me.getPoint(), content);
        Component c = content.findComponentAt(p);
        if (p!=null) c.dispatchEvent(SwingUtilities.convertMouseEvent((Component)me.getSource(), me, c));
      public static void main(String[] args) { new Test(); }
    }

  • Hello, my iphone 5s fell, thereafter i tried taking a picture, the camera app just shows a black screen and hangs, the front camera works on other apps but the rear camera is not working, all other apps work perfectly well, how do i resolve this

    Hello, my iphone 5s fell, thereafter i tried taking a picture, the camera app just shows a black screen and hangs, the front camera works on other apps (such as facetime and skype) but the rear camera is not working, all other apps work perfectly well, how do i resolve this

    Double tap Home button and delete Camera app from multitask-list.
    Do a
    Reset: Hold down the Sleep/Wake button and the Home button at the same time for at least ten seconds, until the Apple logo appears. Note: You will not lose any data
    If problem persist, make an appointment with genius bar for evaluation.

  • Problem with FX5200 it hangs the computer!

    Hi every one.
    i have a problem with my FX5200 T-128, it hangs my computer.
    My system is
    Moderboard: AK75-ec from dfi.com
    Cpu: Amd athlon 1300Mhz
    memory: 512 sdram
    Some time the FX5200 works good, but many times it hangs when i am trying to play some games, some times it take few days and some time it hangs and hangs the system but after few mins it working again.
    i have checked everything Volts, drivers is up to date, upgrade moderboard bios, and everything i have tryid to reinstall xp pro but nothing helps.
    i have tryind to test it in other computer with other mainboards to but same there.
    any one can help me ?
    Regard PFtelecom

    i have Nvidias newest driver installed, it hangs when it try to load the games.
    what more details do you need me to give ?
    and the cpu was a duron 1300mhz not athlon.
    memory 2 256mb Sdram pc133.
    operative system: win xp pro with sp2 before sp1 but same it hangs.
    i have tryid to reset all in bios and make the right settings there to but nothing.
    i have tryid to update bios on moderboard, and for the grafic card i already have newest bios update, i have tryid everything now :(
    Regard Pftelecom

  • Runinstaller (oracle database) hangs the zone and global zone

    We have recently installed a Solaris 10 (Oracle Solaris 10 8/11 s10s_u10wos_17b SPARC) on the SPARC T4 and create two zones out of it.
    We tried to install oracle database on the zone by running the installer (tried xclock and it works very well so display is not a problem).
    Not only the zone was hang the entire Global zone SPARC server was hang and the only way to bring the system back is to power on and off it.
    -bash-3.2$ ./runInstaller
    Starting Oracle Universal Installer...
    Checking Temp space: must be greater than 180 MB.   Actual 16058 MB    Passed
    Checking swap space: must be greater than 150 MB.   Actual 16384 MB    Passed
    Checking monitor: must be configured to display at least 256 colors.    Actual 16777216    Passed
    Preparing to launch Oracle Universal Installer from /tmp/OraInstall2013-06-18_04-26-04PM. Please wait ...-bash-3.2$ Warning: Cannot convert string "-monotype-arial-regular-r-normal--*-140-*-*-p-*-iso8859-1" to type FontStruct
    [when system hang]
    any ideas?

    Hi,
    Please can you confirm, is it a standalone DB that you are trying to install..
    If yes, What is the DB version?
    The error message is simply unable to obtain the xfont. This link might help you:
    http://answers.yahoo.com/question/index?qid=1006042535728
    Please also refer note:
    Error during Installation of Weblogic Server: Warning: Cannot Convert String "-Monotype-Arial-Regular-R-Normal--*-140-*-*-P-*-Iso8859-1" To Type FontStruct [ID 1361691.1]
    Regards,

  • OVM Linux service hangs the system reboot

    System:
    Oracle VM Manager
    Version: 3.1.1.305
    Hello everybody,
    I have the script to start the node manager on system reboot on run level 2. After rebooting my VM I can’t log on with putty anymore. So I opened the console with my RealVNC from OVM Manager and rebooted the system and I can see this service hangs the boot process.
    I was able to open the boot menu in console but I don’t know how to select option “e” (edit the commands before booting) or “c” for command-line.
    Is there any other way to stop this process ( control-c doesn't work either) and continue booting the system?
    Any help will be appreciated.
    Thanks,
    Alex

    Hello
    If the VM is paravirtualized, then you won't see the grub to press e and edit the boot option.
    What you can do, is change the boot from disk to network and use the network process you used to install, but go to rescue mode.
    Does this helps?
    Alvaro

  • The cpu statistic up to 100% in NT and hangs the computer

    Hello,
    I have an web based application that runs in Orion Application Server 1.5.4.
    I use Sun JDK 1.3.1_02. This application is used by 100 users everyday.My problem is that after 2 or 3 days (more 2 days than 3) running the application, the cpu statistic up 100% even hangs the computer.
    The hardware is:
    -2 based cpu Intel Pentium III
    -1 GB.
    I start the application as follow:
    java -Xmx768m -Xms768m -jar orion.jar
    I don't know whats happen but I try it in Win2000 and it doesn't occurs.
    What' the problem?
    Thanks
    Antonio

    I can't use because the client can't use win2000.Let me make sure that the following is NOT true.
    1. If runs in production on the client site on NT and fails.
    2. You ran a test on Win 2000 and it didn't fail.
    3. And then concluded that the failure had something to do with NT.
    The above is NOT true right? Because if it is then I would ask why you think that the test that you ran is indicative of the production use? And what else is installed on the NT box? Do the networks match? Is there any unusual connections in the production system? etc.

  • LR 2.5 Windows Vista 32 bit cannot import and hangs the computer

    Had three new folders that I was going to import into LR. When the first folder was being imported and was still rendering the 1:1 previews I started to import in the second folder. Folder one's photos imported fine but nothing was imported from folder two and LR stopped functioning and hung the PC. On rebooting, the catalog, including the first folder's contents are all there and I could do all my work with them but the moment I try  importing folder two or three I could only choose the files and thereafter will hang the program and PC. Tried copying the contents of folder two to another folder and the  same results. The photos inside folders two and three are viewable through Canon's Digital Professional software so they are still intact. I put some new photos into folder four and the same problem when I tried to import.
    Any ideas or is my LR corrupted and need to be reinstalled?

    I have reinstalled LR 2.5 and the problem is still there, I cannot import from a folder on the hard disk and also cannot import directly from a CF card connected through the USB port. The mouse still moves but LR is frozen and nothing can be selected with the mouse click. Will need to restart Windows.The strange thing is all other LR functions are not affected and as far as i could see, seems to be working like normal, only the import function is dead. What is the next course of action? Any suggestion from any one out there? Help!

  • OracleService INSTANCE will hang the machine

    Hi
    Help needed quickly!
    The service OracleService<INSTANCE> on a production database (10g r2) will not start and hangs the machine.
    The last lines from the alert_log
    Completed: alter database mount exclusive
    Tue Sep 30 18:08:17 2008
    alter database open
    Tue Sep 30 18:08:18 2008
    Beginning crash recovery of 1 threads
    parallel recovery started with 2 processes
    Tue Sep 30 18:08:18 2008
    Started redo scan
    Tue Sep 30 18:08:21 2008
    Completed redo scan
    373702 redo blocks read, 9295 data blocks need recovery
    How to fix the problem, RECOVER DATABASE?
    Do the OracleService<INSTANCE> needed to be started to do
    set ORACLE_SID=<INSTANCE>
    sqlplus /nolog
    connect / as sysdba
    I will get Ora-12560 TNS protocol error
    Regards
    Tobias

    Hi!
    We have now set ORA_<INSTANCE>_AUTOSTART=FALSE, and started the oracleservice.
    sqlplus /nolog
    connect / as sysdba
    --connected to an idle instance
    startup
    Will come to the Database mounted and after that the machine will hang.
    Any suggestions? We now that the database needs recover.
    --From the alert_log
    Started redo scan
    Tue Sep 30 18:08:21 2008
    Completed redo scan
    373702 redo blocks read, 9295 data blocks need recovery)
    Regards Tobias

  • Having issues with Adobe Flash player hanging the browser

    Having issues with Adobe Flash player hanging the browser.
    WIN 7 enterprise 32 bit / Firefox 19.0.2 /
    Internal company website keeps giving attached screen shot error, and hangs the browser when error pops up.
    Steps taken:
    Uninstalled Adobe Flash player with the file “uninstall_flash_player.exe”
    Deleted provided directory in instructions
    "Copy and paste the following and click OK.
    C:\Windows\system32\Macromed\Flash        
    Delete all the files in this folder."
    Rebooted PC and reinstalled the flash player directly from “http://www.adobe.com/support/flashplayer/downloads.html”
    Re launched company website and received same error.
    Repeated above steps as well as uninstalled Firefox browser.  Even went so far as to remove all profile information to start fresh from all profiles on the laptop with the same results.
    Note: The web page will work without the flash player plugin, and my page doesn’t hang the browser. Required to open page in FireFox per company policy.

    I'm sorry you're encountering this.  Could you paste a few of the most recent report ID links displayed when you go to "about:crashes" in the Firefox address bar?
    As for workarounds, the first thing I'd suggest is trying our 11.7 labs release which you can get here: http://labs.adobe.com/downloads/flashplayer.html
    If that doesn't help, please try the troubleshooting steps outlined in this FAQ:
    How do I troubleshoot Flash Player's protected mode for Firefox?
    In particular, I'd recommend temporarily disabling protected mode (for troubleshooting purposes only) to see if that addresses the issue.
    Thanks,
    Chris

  • Hard drive works, but when plugged in hangs the system

    First of all, since this is not a Linux-specific problem I'm not sure this is the right place for this post.
    Anyway, for the past few years I've been using a 250GB IDE hard drive mostly to store backups on.  For quite a while it worked fine, but when  plugged in again after being removed so I could clean out the dust in my PC it didn't work quite right anymore.  It caused the system to hang and gave error messages remniscent of those detailed on this page.  After some fiddling it worked OK for a while, and then one day it randomly did this again.  I took the ribbon cable out, then the hard drive, and realized one of the pins was pushed in (at the time I thought it was broken).  After some reading I decided to sacrifice a ribbon cable.  What I did was yank a pin off of an old DVD drive that doesn't work and shoved it in the cable where the short pin was.  I made sure it was seated well, plugged in in, and hoped for the best.  To my delight it worked without a hitch for maybe a year or more.
    And then a little more than a month ago we had lightning strike a power line outside of our house and it fried my motherboard.  I now have a replacement board, but after all of the taking apart and moving around and stuff, the hard drive is back to its old antics.  The pin-in-the-cable trick wasn't working anymore.  After I realized that the pin wasn't broken half-way but rather pushed in, I grabbed some needlenose pliers and pulled it out.  It now will plug into any ribbon cable just fine and the computer recognizes it, but it's slow at POST and hangs the system when booting the OS, whether it be Linux or Windows.  Knoppix CDs boot just fine, although slower.  S.M.A.R.T. sees no problems.
    Basically I'm wondering 2 things.  First of all, is there anything I can do to get around the hangs?  And second, I'm considering buying an external hard drive enclosure for regular 3.5 inch hard drives and using it as an external USB drive.  Since the drive does still work and I can add/remove stuff while booted in Knoppix, and the main issue seems to be my system hanging, I figure, maybe, I can just plug in the drive when I need it after the computer is already booted up and it will work fine.  Does this sound like a reasonable expectation?

    What you hear may sound like it's the hard drive, but it's really an electronic type of noise. Same with my PB. Try what BGreg said, and wait for the drive to spin down - you'll still hear the noise.
    There was a thread about this issue several months ago, and IIRC the conclusion was that it's a normal noise, and that you should just ignore it if possible.
    If you must make it quieter, set processor performance to the lowest setting in Energy Saver preferences. But it's not going away completely.

  • When I m going to move the front panel or a window for 3d scene instant hang the program.

    When I m going to move the front panel or a window for 3d scene instant hang the program.
    Υou can easily try to "generate sound" in the examples.
    Can I overcome this? (without lock movement).
    tnx
    Giannis

    Yes, I was right -- you have a single loop where you generate data points and display them.  Consider the operation of your program if you do not display the data as a Chart, but instead simply display (as an indicator) the most recent value.  The loop will go into your sub-VI, wait the appropriate time to generate a point, return, display, and immediately call the sub-VI again.  Fine, it should run at the speed of the sub-VI.
    Now add the Chart.  Same thing happens, but now you move the Chart.  The top-level routine, tasked with displaying the Chart, needs to use additional time to repaint the Front Panel, so it take it.  Now when you call the sub-VI again, time has elapsed.
    What you need to do is to run two loops in parallel, so-called Producer-Consumer Design Pattern.  Have your sub-VI return a Waveform (not a Chart).  This loop becomes the Producer -- all it does is "produce" a Waveform at whatever rate the sub-VI specifies.  Create a Queue of Waveforms outside this loop, and enqueue the Waveform onto it.  In a parallel loop (usually written below the Producer Loop), write the Consumer loop, into which you pass the same Queue.  Here you Dequeue the (latest) Waveform and display it on the Chart.
    Now, while this runs, move the Chart.  The Consumer loop will be delayed (because you are refreshing its Front Panel), but the Producer loop, running in parallel, just keeps going, putting more points on the Queue.  When the Consumer finishes its Front Panel update, it blithely plots whatever is on the Queue.  If you look carefully at the traces being plotted, you should notice that when you move the Chart, the plotting temporarily stops, then the "missing" points are speedily plotted and plotting resumes at whatever rate it was before you moved things.  This is the power of parallel processing and LabVIEW.
    Bob Schor
    P.S. -- there are examples of Producer Consumer patterns -- if you open LabVIEW and go to File, New, you should see some examples under From Template.

  • Firefox hangs the second i open it

    Firefox hangs the second i open the window. I can't get to file or any other part to disable the add ons Would like to be able to fix it so i can get back to my web pages. The computer that is haveing the problem is running windows Vista home
    == This happened ==
    Every time Firefox opened
    == the last 2 updates where installed

    OK on the iMac now but not sure how to send the System Details. Any help welcome.

  • Mac Mail PhotoBrowser hangs the app

    Just noticed that clicking on the Photobrowser Icon in Mac Mail hangs the entire application.  Apparently it is looking somewhere for the browser that it can no longer find.  Is there a place to set up the link for Photo Browser.  I know it is supposed to go to iPhoto library, or Aperature (which I don't use).  Is there somewhere in Preferences where this can be set or is this a bug in the application itself?

    Hi,
    Sorry I don't know what are you trying to do but printing from iPhone to your printer is very simple because your printer supports AirPrint. Please use the following instructions:
       http://www.apple.com/support/iphone/assistant/airprint/
    Regards.
    BH
    **Click the KUDOS thumb up on the left to say 'Thanks'**
    Make it easier for other people to find solutions by marking a Reply 'Accept as Solution' if it solves your problem.

Maybe you are looking for

  • Address book access

    Hello, I have a question regarding the Address Book application. Is there a way to unlink some of the contacts in Address Book that I don't usually contact from Mail.app. I have contact information of some university professors and some of them have

  • What Preferences Control Window Size and Location?

    I have a number of windows that over time have taken on weird sizes and locations. For example, a print window habitually shows up with the print button underneath the dock, forcing me to move the window to click on the options. Is there a preference

  • Query on Weblogic Licensing

    Hi, How does Oracle Weblogic licensing model work? Is there any documentation available on the Internet for the same? Thanks in advance! regards, Anand

  • Is 10g Forms and Reports with E-Business Suite 11.5.10.2?

    Hi Experts, I want to know, 10g forms and reports is certified with Apps 11.5.10.2? Thanks R.Sundaravel

  • Check mark not showing after importing in Image Capture

    The check marks will show right after importing photos to a hard drive in Image Capture. However, after unplugging my iPhone and plugging it back in to import new photos, the check marks are not showing up for the photos I have already imported. One