Does JOptionPane have a bug in jdk1.4?

Sorry to post this again, but last time had posted it under a different title/topic. The following piece of code works fine with jdk1.3, but HANGS with jdk1.4-import java.awt.event.*;
import javax.swing.*;
public class TestDriver extends JPanel {
   JTextField textField1, textField2;
   MyInputVerifier inputVerifier;
   public TestDriver() {
      initPanel();
   private void initPanel() {
      textField1 = new JTextField(10);
      textField1.setName("Test");
      textField2 = new JTextField(10);
      this.add(textField1);
      this.add(textField2);
      inputVerifier = new MyInputVerifier();
      textField1.setInputVerifier(inputVerifier);
   public static void main(String[] args) {
      JFrame frame = new JFrame();
      frame.getContentPane().add(new TestDriver());
      frame.setSize(200, 100);
      frame.setVisible(true);
      frame.addWindowListener(new WindowAdapter() {
         public void windowClosing(WindowEvent e) {
            System.exit(0);
   class MyInputVerifier extends InputVerifier {
      public boolean verify(JComponent comp) {
         //only when the user enters "Test" in the first text field, should the focus be
         //transferred to the next text field
         if(comp.getName().equals("Test")) {
            String text = ((JTextField)comp).getText();
            if(("Test").equals(text)) {
               return true;
            } else {
               showError();
               return false;
         return true;
   private void showError() {
      //this works fine with both jdk1.3 and jdk1.4
      System.out.println("Wrong!\n Enter \"Test\"");
      //this is where the program hangs when run with jdk1.4
      JOptionPane.showMessageDialog(this, "Wrong!\n Enter \"Test\"");
}Can anyone please confirm that it really doesn't work with jdk1.4? Also please let me know if anything is wrong with the program.
I searched in the bug database and found that a few bugs on similar topics have already been reported. But I didn't find one (which is open) particularly on this topic. Is anyone aware of a bug on this topic already reported? If so, could you please post the appropriate link here.
Thanks a lot.

Thanks for the reply. The problem is not related to JOptionPane. It's related to verify method of InputVerifier. First of all, as per the jdk1.4 Javadocs, the verify method is not allowed to have side effects. So calling JOptionPane.showMessageDialog() from within verify is not a correct implementation. But the javadocs say that shouldYieldFocus of InputVerifier is allowed to have side effects. So basically the shouldYieldFocus method needs to be implemented and it should pou up a dialog when the input is incorrect.
BUT, it doesn't work either. It has a bug (4532517). Here is the link to the related bug report-http://developer.java.sun.com/developer/bugParade/bugs/4532517.html
A workaround has been given there and after using that, the program works fine.
I have no idea, why it works fine with 1.3. As you said, due to changes in the Focus mechanism in jdk1.4, this problem has arisen.
Thanks.

Similar Messages

  • Does Safari have a bug ?? December 06, 2006

    For the past week it appears that Safari is getting sicker. Web pages I have viewed a thousand times are now not loading. I haven't been able to get onto google in at least a week. Images are not being displayed on other sites and sites that do load take a while. also the server for my mail times out ?? I have deleted cookies, reset safari, emptied cache ... so what do I do now ?? anyone else having the same problems ??

    I think you issue maybe with the security update that was issued last week.
    Whenever I try and change my Top Friends, the page just hangs. The problem occurs when I try and navigate to page 2 - 8 of my friends. the page hangs then gives me the following error message:
    Safari could not open the page “http://editprofile.myspace.com/index.cfm?fuseaction=user.editTopFriends&UserName =++++++++++(REPLACED BY POSTER)+REPLACED BY POSTER+REPLACED BY POSTER)
    &f_search=&searchby=first&page=1&finalpage=&prevPage=0&lastpage=0&PREVPageLASTON ERETURENED=3412006&PREVPageFirstONERETURENED=14061&TotalRecords=301&
    myTopFriends=51630402%2
    C21340095%2C65886561%2C77950793%2C3497846%2C749668%2C116086148%2C46411252%2C7498
    5218%2C563624%2C26224531%2C24373698%2C356
    62885%2C43284317%2C22053298%2C14907883%2C110936497%
    2C22186704%2C16078732%2C88426198%2C37420230%2C37386493%2C55377667%2C571973&topNu mber=24” because the server stopped responding.
    Also, my page was completely jumbled as well (went thru the pain of re-doing the page... but haven't seem to have an issue since).
    I'm also have issue on other sites (mainly messageboards) which I think is Java Script related. In most cases the page hang at 'completed 6 of 7 items' (when viewing the activity window it reads:
    http://www.burstnet.com/cgi-bin/ads/ad10031b.cgi/v=2.0S/sz=468x60A/88471/NI/RETU RN-CODE/JS/ 0 bytes of ?). After a minute or two it times out (activity window says Timed Out) and the page appears (of course the ad is missing)
    This issued started at the same time as the myspace issue.
    And yes, I did the security update last week, that's when i started having issues...
    Lastly ,this is happening on BonEcho (Firefox 2.0) as well, which mean it may not be just Safari. Can anybody verify? Any solutions?
    Judging by the number of people posting issues with Safari (which a lot seem to be similar in nature) since the security update, we are not alone...
    iMac   Mac OS X (10.4.8)  

  • Does anyone have problems occasionally with their slide to unlock on iphone 4s with the ios7 update? And do you think there will be a bug fix? Bit worried

    Hi everyone,
    I've recently updated my iphone 4s with the ios7 update and there was a bug fix I also downloaded recently but I hadn't noticed anything wrong at the time. I know it's not happened that often today but does anyone have any problems with their 'slide to unlock' button and have to reload their iphone again? Do you think there'll be a bug fix for it? Just worried as it's not old and I have a feeling I shouldn't have bothered with the update at all.

    Why would you think it's a bug?  If it were a bug EVERYONE would be having the same issue.
    Basics from the user guide are restart, reset, restore from backup, restore as new.

  • Does anyone have a link to common bugs/problems encountered with flex 3?

    Hi,
    does anyone have a link to common bugs/problems encountered
    with flex 3, just so i can try and familarise myself before I go
    asking etc? thanks folks!!

    flex warnings:
    http://livedocs.macromedia.com/flex/2/langref/compilerWarnings.html
    flex errors
    http://livedocs.macromedia.com/flex/2/langref/compilerErrors.html

  • Bug: c410b - hp photo print gadget 2.0 32bit does not have plain paper in drop down

    printer:  c410b
    os:  windows 7 ultimate 32bit
    hp photo print sidebar gadget does not have plain paper in the paper type drop down and also resets itself to default if you close and re-open the gadget.
    also, if i select the 'fax' bit of it...  plain paper become available.  return to the 'non-fax' bit...  it reverts to only the glossy paper types.
    also tested the old 2008 dated gadget that i found buried on your ftp server.  same behaviour.
    64 bit does and works perfectly.
    verified on 5 machines.  latest 'full' exe used to install.  never touched the cd.
    same behaviour after removing and re-installing the gadget with the download file from hp web site.
    edit:  for any hp staff - online chat with your tech (who couldn't help) reference is 8590546

    bump.  got an email today saying to call HP in the USA because I have the wrong printer settings.  they also quoted a c410a even though i told them numerous times a c410b.
    number 1 - i'm in the UK and don't want to call USA to be on hold for an hour for some college-drop-out to tell me *i'm* wrong.
    number 2 - 5 32bit machines and i went round to a different location and tried 3 more machines there.  same.
    number 3 - *what* setting?  you install the gadget, click the options 'wrench' and the paper types are in there...  *everything* else on the printer works...  just not the 32 bit gadget - no plain paper available to choose and paper tray keeps reverting to photo tray.
    number 4 - it works on several 64 bit machines, with the same settings.
    i'm guessing a system-locale issue where the gadget doesn't poll the driver properly for UK paper sizes or something.
    any help?  anyone?

  • [BUG] Adobe Bridge does not support OSX 10.10's "Go Back" keyboard shortcut and does not have a custom one.

    Adobe Bridge does not support OSX 10.10's "Go Back" keyboard shortcut which is `command + shift + [` and does not have a custom one.
    I tried "delete" key which is backspace for Windows. It will do delete identical to "delete X" key (which is delete key for Windows).
    Sidenote: `command + shift + \` is to go back in views (switch views), not folder structure.

    Exactly where do you want to use a GO BACK "shortcut" in Bridge?  Maybe I don't even understand what you mean by Go Back.  Bridge is only a file browser, nothing more. It doesn't open, edit, manipulate or save files at all.
    Are you simply referring to going back to view a folder that you viewed before?
    Please don't take this a criticism.  As someone who will gladly pay money not to have to learn any shortcuts at all, I'm just puzzled and curious, that's all.

  • Asking the Bridge Team:  Bridge "working color space" setting when one does not have the Suite?

    Common sense tells me there is really no such thing as a
    "working color space" in Bridge, because
    Bridge is not an image editor, just a browser
    Therefore, this may turn out to be a purely academic question; but that doesn't keep my curiosity from forcing me to ask it anyway. ;)
    Is there a way to set the Bridge
    "color settings" when one does not have the suite?
    The only Adobe program I keep up to date is Photoshop, so I've never had the suite. My version of Photoshop is 11 (CS4) and I run updated
    (not upgraded) versions of Adobe Acrobat 7.x, Illustrator 10.x and InDesign 2.x. Consequently, the Synchronize color settings command is not available to me.
    It seems to me that Bridge is behaving like a proper color-managed browser (e.g. Firefox with color management enabled), in that it displays tagged image files correctly and assumes sRGB for untagged image files. This normally works fine.
    But what if I wanted Bridge to assume my
    Photoshop color working space for untagged images
    so that it behaves the same as Photoshop? I'm just curious, as I deal with a minuscule, practically negligible amount of untagged files.
    My reason for bringing it up now is that I don't recall this being explicitly mentioned in forum replies when users inquire about color settings in Bridge. A recent post regarding Version Cue in the Photoshop Macintosh forum got me thinking about this. Just wanting to make sure that I'm right in my assumption that
    there is really no such thing as a
    "working color space" in Bridge, because Bridge is not an image editor, just a browser.
    Thanks in advance.

    Hi Ramón,
    Thanks for sharing the outcome of your tests. However, I may have found a bug/exception to Bridge's colour management policy!
    It appears that CMYK EPS photoshop files are not colour managed in Adobe Bridge, even if they contain an embedded ICC profile.
    I've tried every combination in the EPS 'Save As' dialogue box, so it doesn't seem to be an issue with file encoding. Also, Bridge doesn't rely on the low-res preview that is held within the EPS itself.
    My guess is that Bridge is previewing the CMYK EPS with a Bridge-generated RGB image, but it's being displayed as monitor RGB (assigned) rather than colour managed (converted to monitor RGB). For most users the difference will be barely perceptible, but the problem became very noticeable when using Bridge to preview Newsprint CMYK images on a wide-gamut monitor (images that should have appeared muted really leapt off the screen!).
    How do I report this to the Colour Police at Adobe?!?

  • I have a late 2008 white macbook.  I have a mini dvi to hdmi adapter, and a hdmi cord.  My cannot get my MB to detect an external monitor.  Nothing happens when plugged in.  Also, my display settings does not have an option for mirroring or arrangment tab

    I have a late 2008 white macbook.  I have a mini dvi to hdmi adapter, and a hdmi cord.  My cannot get my MB to detect an external monitor.  Nothing happens when plugged in.  Also, my display settings does not have an option for mirroring or arrangment tab

    Yeah, I'm having the same exact problem - It seems that the thunderbolt minidisplay port is only able to output the analog VGA signal, not the digital signal to support DVI and HDMI. This is a bug that came up after installing 10.7.1. I bought my macbook air with 10.7 on it, upgraded it to 10.7.1 as soon as I got it, so I have never been able to use hdmi or dvi with my macbook air. This is an extremely frustrating problem for me, I used HDMI on a daily basis with my PC. I have spent many hours at the genius bar running diagnostic tests so Apple can get as much information as possible to create a fix for this problem. I have been emailing tech support for 3 or so weeks now, they keep saying that they are working on a fix and it should be out soon, but 10.7.2 has come and gone and I still have no HDMI functionality with my MacBook Air!

  • I have just updated to Yosemite, but now I can't get the custom shortkeys to work. In Mavericks I had no problem whatsoever, but now even after googeling and restart no solution. Does anyone have the problem? All the other shortcuts work!

    I have just updated to Yosemite, but now I can't get the custom short-keys to work.
    In Mavericks I had no problem whatsoever, but now even after googeling and restart no solution.
    Does anyone have the problem? All the other shortcuts work!

    Hi Thomas,
    I can confirm the problem you are hitting. The XML test trace does not get recognized at all, and it defaults to Eclipse's basic Open File behaviour. I am not sure if it's because the format definition is missing, or if it's because something prevents the trace type from being recognized. I will open a bug about it.
    Thanks for identifying this issue!
    In the meantime, if you'd like to experiment with XML analyses, you can also take a look at the example at https://github.com/tracecompass/xml-analysis-example .
    Cheers,
    Alex

  • WP8.1 Universal : Error Image does not have a candidate in main app package while creating a package

    Hi everyone : 
    I just finished an universal app was gonna publish it on the store, on windows 8.1 no problem
    On Windows Phone 8.1 I got error when creating the app package for every images I declared in the app manifest
     "App manifest references the image 'Assets\Tiles\StoreLogo.png' which does not have a candidate in main app package"
    Here is a par of my manifest with my assets
    <m3:VisualElements DisplayName="Spirit Of Metal" Square150x150Logo="Assets\Tiles\Square150x150Logo.png" Square44x44Logo="Assets\Tiles\Square44x44Logo.png" Description="SoM.WindowsPhone" ForegroundText="light" BackgroundColor="transparent">
    <m3:LockScreen Notification="badgeAndTileText" BadgeLogo="Assets\BadgeLogos\BadgeLogo.png" />
    <m3:DefaultTile Square71x71Logo="Assets\Tiles\Square71x71Logo.png" Wide310x150Logo="Assets\Tiles\Wide310x150Logo.png" DefaultSize="square150x150Logo">
    <m3:ShowNameOnTiles>
    <m3:ShowOn Tile="square150x150Logo" />
    <m3:ShowOn Tile="wide310x150Logo" />
    </m3:ShowNameOnTiles>
    </m3:DefaultTile>
    <m3:ApplicationView MinWidth="width320" />
    <!--Used in XAML Designer. DO NOT REMOVE-->
    <m3:InitialRotationPreference>
    <m3:Rotation Preference="portrait" />
    </m3:InitialRotationPreference>
    </m3:VisualElements>
    I made clean, delete tempory files, restart visual studio, delete and add the picture again, open the
    manifest file to check manualy the path (it is correct with backslash)... without result.
    Finaly I found a fix :  generate app bundle at never, as my app has no specific
    assets in other language I don't understand why. 
    Is this a bug (and I would like to report it) or is there a reason to this exception ? 
    Regards

    I cannot reproduce this.  Can you create a very simple repro of this issue and post to OneDrive?
    Jeff Sanders (MSFT)
    @jsandersrocks - Windows Store Developer Solutions
    @WSDevSol
    Getting Started With Windows Azure Mobile Services development?
    Click here
    Getting Started With Windows Phone or Store app development?
    Click here
    My Team Blog: Windows Store & Phone Developer Solutions
    My Blog: Http Client Protocol Issues (and other fun stuff I support)

  • My friend's iPod touch 5th gen is locked somehow for 41 years and she does not have a backup. Is there a way to unlock the iPod without restoring it or loosing the pictures and videos from the camera roll?

    My friend's iPod touch 5th gen is locked somehow for 41 years  and she does not have a backup. Is there a way to unlock the iPod without restoring it or loosing the pictures and videos from the camera roll, the applications can be redownloaded and she had no music. Is there any known bug about ipods locking on their own because no one seemed to have tried to bypass the 4 digit code and it is locked for 26 million minutes.So thank you if anyone has any information or help for us.

    Your friend may have placed the ipod next to an object that repeatedly pressed the screen.  Under certain circumstances this can lead to what appears to the iTouch to be failed attempts to access the system.  After repeated failed attempts, the Touch increases the waiting time required for the password and may ultimately lock in the way you describe.
    It's been a while since this was posted, but this might be informative to someone else who finds themself in a similar predicament.

  • What is apple doing to fix the bugs from IOS 7.1.2 update? this update has ruined my phone

    What is Apple doing to fix the bugs from IOS 7.1.2 update??? This update has ruined my phone! Why would you put out a update you know is going to ruin someones phone? Whats being done? I have tried everything to fix my phone which was just fine before Apples IOS 7.1.2 update!!!

    I have also experienced issues with my iphone5 since updating to ios 7.1.2, prior to this update my phone was working perfectly fine and I know I didnt cause any damage to the phone because I baby my iphone as if it was my child. Ever since I updated to 7.1.2 my phone shutts itself down while I am using it, it can be while using whatsapp, browsing the internet or using apps, more than anything it fails while using the internet. The screen will either start to flicker or vertical lines will pop up and then the phone will fade to black, after this happens the phone will get really hot and to turn it back on I have to wait 5-10 minutes and hold down the power and home keys at the same time for about 15 seconds for it to turn back on, I have to wait 5-10 minutes because if I dont when I boot it back up it immediately shutts down again. This is a constant all day thing and for now i get by just making phone calls and sending regular text but I try to keep the action down to a minimum to prevent missing a phone call. I tried clearing the phone and rebooting it to original setting but this didnt fix it. After reading and speaking with several techs they tell me that ios 7.1.2 rolled out some performance adjustments one particular that affects the amp levels that the battery works at and supposedly the iphone 5 cant handle it, they explained that the phone for certain activities is asking for more or less power and the phone panics into safe mode and shutts itself down. My battery life is fine so I havent changed the battery like someone had suggested. In the diagnostic data it gives a panic.ips error. Id really like to know if there is any possible way to roll back to 7.1.1 through jailbreak or any other way, I was perfectly happy with this phone and didnt plan on buying another one for atleast 1-2 more years. If anyone can help me out this would be greatly appreciated, if not I hope apple is working to fix this.

  • I've been working on our church website and suddenly, my computer will not connect to the site. I keep getting a message saying that the the connection to the server was reset while the page was loading. Does anyone have any ideas of how I can fix this?

    I've been working on our church website and all of a sudden this week, my computer will not connect to the site. I keep getting a message saying that the the connection to the server was reset while the page was loading. Does anyone have any ideas of how I can fix this?

    The "The connection was reset" error message can be caused by a bug fix for the BEAST (Browser Exploit Against SSL/TLS) attack that the server doesn't handle.
    *[[/questions/918127]]
    *[[/questions/918028]]

  • I have installed the new iOS 5 on my Iphone 3GS and my bluetooth connection doesn't work anymore. Does anybody have a solution?

    I have installed the new iOS 5 on my Iphone 3GS and my bluetooth connection for my Philips bluetooth headset doesn't work anymore. Does anybody have a solution?
    I have checked the headset on another Iphone with iOS 4 and it works well.
    Thanks for your help!
    Pierre (from Paris - France)

    Bonjour Pierre,
    there seems to be a bug in iOS5 with regards to Bluetooth. THere are a lot of threads in here on this. We're all waiting for Apple to fix this...

  • The document does not have a valid format.

    I created a special format document when I had Pages '08. I needed the proportions of the document to match the special paper on which the document would be printed so I created a special size for my document rather than 8 1/2 x 11. If I remember right it was closer to 8 1/2 x 13 or so. Anyway, I have now upgraded to Pages '09 and can no longer open any of these special format documents. I have versions of a couple of the documents that were created in Pages '08 without the special proportional size page and they open without issue. However the special size documents all get "The document does not have a valid format" and will not open. I really NEED these documents. I have seen some posts about renaming to a .zip and then something about an index file but I don't understand where this index file might be and what good it will do to open it. Also I know the files exist because they are still showing their original file sizes (not 0 MB). Any assistance would be appreciated.

    Don't continue to search fruhulda.
    I never saw such files.
    The only things which I may recognize are :
    the strings :
    mluc
    (10) nbNO --> Norvegian
    (16) svSE --> Sveridge
    (4) fiFI --> Finnish
    (1) daDK --> Danish
    (17) zhCN --> Chineese(1)
    (5) frFR --> French
    (8) jaJP --> Japanese
    (3) enUS --> English (US)
    (12) ptBR --> Portuguese (Brasil)
    (15) esES --> Spanish
    (18) zhTW --> Chineese(2)
    (14) ruRU --> Russian
    (9) koKR --> Korean
    (6) deDE --> Deutch (Germany)
    (2) nlNL --> Dutch (Nederland)
    (7) itIT --> Italian
    They are the symbols used to identify the languages used for 16 versions
    Two others are missing:
    (11) Polish (Polska) missing
    (13) Portuguese (Portugal) missing
    I found also
    iMac in plain ASCII and .i.M.A.C (dots are in fact NIL characters) which is the Utf 16 representation of iMac.
    During a few seconds I thought that it was a piece of System Files but the page thumbnail must be available somewhere so that the Finder is able to display it.
    I will send these genetically modified documents to Apple Bugs Hunters.
    Yvan KOENIG (VALLAURIS, France) lundi 31 janvier 2011 17:46:39
    At the very end there is also the trailing string which fool the message parser:
    the formula : *_Copyright Apple, Inc., 2010

Maybe you are looking for

  • Hyper-V 2012 Gen 2 VM SCSI DVD device fails to boot from iso files

    I am running Server 2012 R2 in Hyper-V Server role for my home lab. I am trying to create a gen 2 vm, with Server 2012 R2 iso loaded in the SCSI DVD device, but every time I try to start the vm it fails to start with the following error: This is the

  • Do I need Adobe pro to use ensign?

    Had to wipe my hard drive, can't find ensign.

  • LCD/LED Monitor Problems

    I have just purchased a new 2010 Mac Mini and an LG E2240S LCD - LED backlit monitor. I have this connected using a Mini DisplayPort > VGA adapter. I have resolution set at 1920x1080 at 50Hz which seems the best setting. The problem is everything see

  • TREX Search on attachments in CRM 7.0

    Hi , Is the TREX search on the attachments to Service orders,Activities.etc  in CRM7.0 a standard functionality? Do we have to do any enhancements for enabling the TREX search on attachments to Service orders etc..in CRM 7.0

  • KM: automatically remember author to review his document

    Hello experts, I'm working with Knowledge Management and Collaboration in EP 7.0. There different authors manage lots of documentations for end-users.  Is there a possibility to automatically remember (or even raise up) the author of a document to re