Mnemonics on JTabbedPane only work if IN one of the panes?

I've run into an interesting behaivor on JTabbedPane. You can SEE the mnemonic for a tab pane, but unless your focus is on a control that's a child of one of the tabs in the JTabbedPane, you will will NOT be able to get a non-visible tab to display. It would seem (IMHO) that those nmemonics should work just like any other nmemonics in the dialog. If you type ALT-B you should go to the ALT-B Tab. See below for an example of this behavior. When in Label 1's field try out ALT-F and ALT-S (the two tab nmemnoics), nothing happens. When in Label 3's field you can ALT-F and ALT-S and have the dialog update as would be expected.
- james
public class TestMain
     public static void main(String[] args)
JPanel panel1 = newLabelAndFieldPanel( "Label 1", KeyEvent.VK_L, 0 );
JPanel panel2 = newLabelAndFieldPanel( "Label 2", KeyEvent.VK_A, 1 );
JPanel panel3 = newLabelAndFieldPanel( "Label 3", KeyEvent.VK_B, 2 );
JPanel panel4 = newLabelAndFieldPanel( "Label 4", KeyEvent.VK_E, 3 );
JTabbedPane tabPane = new JTabbedPane();
tabPane.addTab( "First Tab", panel3 );
tabPane.setMnemonicAt( 0, KeyEvent.VK_F );
tabPane.setDisplayedMnemonicIndexAt( 0, 0 );
tabPane.addTab( "Second Tab", panel4 );
tabPane.setMnemonicAt( 1, KeyEvent.VK_S );
tabPane.setDisplayedMnemonicIndexAt( 1, 0 );
JFrame frame = new JFrame( "Testing Mnemonics and JTabbedPane" );
frame.setSize( new Dimension( 500, 300 ) );
frame.getContentPane().setLayout(new GridLayout(0,1));
frame.getContentPane().add( panel1 );
frame.getContentPane().add( panel2 );
frame.getContentPane().add( tabPane );
frame.show();
     static JPanel newLabelAndFieldPanel( String labelText, int key, int pos )
JPanel panel = new JPanel(new GridLayout(1,0));
JLabel label = new JLabel( labelText );
JTextField field = new JTextField();
label.setLabelFor(field);
label.setDisplayedMnemonic( key );
label.setDisplayedMnemonicIndex( pos );
panel.add( label );
panel.add( field );
return panel;
}

This is the bug 4624207(http://developer.java.sun.com/developer/bugParade/bugs/4624207.html)
and it was fixed in 1.5

Similar Messages

  • I purchased Adobe photoshop elements II and Adobe premiere elements II. They are both on one disc. My computer crasded and I had to reload Windows. I only have one serial number and it only works with photoshop II. The same serial number will not work for

    I purchased Adobe photoshop elements II and Adobe premiere elements II. They are both on one disc. My computer crasded and I had to reload Windows. I only have one serial number and it only works with photoshop II. The same serial number will not work for Premiere. I dont have any other serial numbers. What do I do???

    Static_Unit
    I am getting a bit concerned about what is happening in your situation. Yesterday you posted your question in at least two different forums, one of them being here in the Premiere Elements Forum.
    Don't Have Serial Number for Premiere, Only Photoshop?
    Wherever you posted, the reply was to contact Adobe via its Adobe Chat. It is the only one who can sort out this matter for you.
    In the thread cited above I offered to help you with the difficulties that you were having visualizing the Adobe Chat in its web page. I was waiting for your follow up on that in the above thread. Instead, I find your same question in a new Adobe Premiere Elements Forum thread this afternoon with no refer the prior threads or prior recommendations given you.
    I will also mention again...when you buy the Photoshop Elements and Premiere Elements bundled in one packaging and with installation files for each on the same installation disc, each program has its own serial number. The Photoshop Elements serial number does not work for Premiere Elements and vice versa. The serial numbers are on labels on a box which houses the installation disc envelope(s). So, if you purchased both programs and found the Photoshop Elements serial number, then the Premiere Elements serial number should be in a label right underneath the label with the serial number for Photoshop Elements. I recall writing this in your yesterday's thread on this matter.
    The moderator will no doubt be along shortly to close or delete this thread. So, just in case, please bookmark your yesterday's thread cited above so that we can continue this communication which is trying to help you.
    Thanks.
    ATR

  • I have an ipad version 5.1.1. i have multiple albums in the ipad and i want to transfer some photos to my computer but when i open the ipad files via "computer" i can only see picture from one of the albums.what should i do?

    i have an ipad version 5.1.1. i have multiple albums in the ipad and i want to transfer some photos to my computer but when i open the ipad files via "computer" i can only see pictures from one of the albums.what should i do?

    You can only import photos from the camera roll into the computer. Is that the album that you are seeing?
    Any albums that you create on the device itself (the iPad that is) cannot be transferred to your computer. iPad created albums do not contain copies of your photos but merely pointers to those photos so they do not actually exist in those albums.

  • What should i do my sleep/wake button on iphone 5 does not work properly it only works if i press on the left side of it and my iphone still on warranty i heard its a common problem

    what should i do my sleep/wake button on iphone 5 does not work properly it only works if i press on the left side of it and my iphone still on warranty i heard its a common problem

    If there's a hardware defect and your phone is under warranty, bring it to Apple for replacement.

  • Why the sound only is reproduced by one of the headphone

    why the sound only is reproduced by one of the headphone

    Try another set to see if the headphone jack is defective.

  • 8130: CREATE ACTIVE STANDBY PAIR must only be run on one of the MASTER node

    CkptFrequency=600
    CkptLogVolume=128
    OracleNetServiceName=abmsrv1
    PassThrough=1
    plz give me some help~~thx
    帖子经 user11036969编辑过

    Here's the original post (the forum seems to have truncated it for some reason):
    Content of the new Post:
    Command> CREATE ACTIVE STANDBY PAIR abmmd ON "node1",abmmd ON "node2"
    > RETURN RECEIPT
    > STORE abmmd ON "node1" PORT 21000 TIMEOUT 30
    > STORE abmmd ON "node2" PORT 20000 TIMEOUT 30;
    8130: CREATE ACTIVE STANDBY PAIR must only be run on one of the MASTER nodes.
    [ABMMD]
    Driver=/abm/tt02/tt/TimesTen/tt1121/lib/libtten.so
    DataStore=/abm/tt02/tt/tt11g/data/abm
    LogDir=/abm/tt02/tt/tt11g/data/logs
    SMPOptLevel=1
    TypeMode =0
    DurableCommits=0
    ExclAccess=0
    Connections=1000
    Isolation=1
    LockLevel=0
    PermSize=50000
    TempSize=1000
    ThreadSafe=1
    WaitForConnect=0
    Logging=1
    LogFileSize=256
    LogPurge=1
    CkptFrequency=600
    CkptLogVolume=128
    OracleNetServiceName=abmsrv1
    PassThrough=1
    plz give me some help~~thx
    This error means that when TimesTen is processing this statement and asks the operating sysstem for the official hostname of the local node the O/S is returning somethign different to 'node1' or 'node2'.
    it may be that you have incorrectly set the hostname to inculue a DNS domain (e.g. node1.xxx.yy.zzz).
    Chris

  • It is unclear the advantage to pre-ordering the new iPhone 5. What I have read is that it will ship on the 21st? If so the only way to get one on the 21st is go stand in line. Please correct me if I am wrong.

    It is unclear the advantage to pre-ordering the new iPhone 5. What I have read is that it will ship on the 21st if you pre-order? If so the only way to get one on the 21st is go stand in line. Please correct me if I am wrong.

    if you don't have time to stand in line or don't want to risk getting there too late and leaving empty handed from the apple store preordering will guarantee you one but possibly in a slightly longer timeframe

  • Captivate 8 Continually Crashes: When trying to publish, When trying to use the Object Style Manager. Also it is blocked by Windows Firewall (adobecaptivatews) every time it launches. Working with Captivate App Packager the pane to import from Adobe Edge

    Captivate 8 Continually Crashes: When trying to publish, When trying to use the Object Style Manager. Also it is blocked by Windows Firewall (adobecaptivatews) every time it launches. Working with Captivate App Packager the pane to import from Adobe Edge is missing, so not clear how to import. Overall it seems unstable. Am I doing something wrong? Trying to evaluate before buying so working on a trial version (14 days left), but a bit concerned with Captivate 8 Performance. Please help! :-

    Hi Vikram and Lilybiri,
    Thanks for your responses :-)
    I'm working on Windows 8.1... I think that I may have found the issue... I was saving the file in a project directory rather than the default My Captivate Projects folder...
    Perhaps Captivate was struggling to find resources it needed?
    It hasn't crashed for a while now, though it is struggling - I'm working with a 54 slide PPT presentation that is linked and it takes a very long time to interact.
    Sometimes it says that I've removed slides, which I haven't?
    Best,
    Christy.

  • Intel iMac sound only works out of one speaker, but both headphones...

    Hello.
       I've run into a very interesting problem with the sound of my 20" Intel iMac's sound. Ever since I moved into my new appartment, my Logitech computer speakers have only worked out of the left speaker. The strange bit is that if I plug any pair of headphones into the same jack I get perfect sterio sound. I've check my sound preferences to make sure the sound is balanced, checked multiple pairs of headphones (that are all known to work perfectly), multiple pairs of computer speakers (that are all known to work perfectly), I even plugged in my M-Audio fast track USB audio interface with the same results (left channel only with speakers, sterio with headphones) Another weird thing is that I tested both pairs of computer speakers with my roommate's 20" Intel iMac (same model) and both worked just fine.
      I feel like I've run the gambit of things I could do to eliminate a faulty component. Do you think I have a faulty jack? something wrong with my software/hardware? I'm completely stumpped...anyone have any ideas?

    You've done a lot of testing such that it sounds like the jack and plug combination of the Logitechs and the iMac are just a hair short now, and the move is the only thing that changed. Can you compare the headphone plug and the Logitech plug side by side for length? Is one of them a straight plug and the other a 90 degree such that it can't get all the way in now? I'm sure you've tried pushing it in extra hard or wiggling a bit. One guy on here awhile back sent pix of his headphone port and the one right beside it on the back of his iMac, and the headphone one was recessed slightly deeper into the iMac's body.

  • I have an Iad2 and ever since ios6-there are issues.I get occasional lock-ups and have to reboot. The WSJ app freezes when running their videos to the end. The only work-around is to stop the video before it's over. Worse than windows me !!!!!

    My Ipad2 worked perfectly before ios6 upgrade. It now freezes occasionally and I have to reboot to get it to work. Also the WSJ app will now freeze if I try and run one of their videos that is imbedded in the article. My only work-around is to stop (press done) before the end of the video or I have to do a total reboot. The problems remind me of Windows ME . Will Apple resolve these issues or become more like Microsoft. Hopefully there will be a restore button in the future like Microsoft was forced to do because a lot of upgrades are just terrible. Am I crazy or are there other people having the same issues with ios6, or could this just be a coincidence and my ipad2 is starting to fail just when ios6 arrives ?

    I know this will not help but, the bluetooth headset I purchased for my wife works great and it pairs with our car and our sound bar in the livingroom (Motorola Droid Razr) 98.72.16.XT912.Verizon.en.US
    However I did not upgrade over the air but from a android web site and placed it on my external sd card. I believe this made the difference in why we had no issues and upgraded functionality has been great.
    Please note when I mention these bluetooth devices I mean the Razr connects with no problems.
    It also had no internet issues and none of the problems others have complained about in other threads.
    unfortunately when you say thousands have these issues I cannot say that is accurate. The hope is when large numbers of owners have updated to the Jelly Bean and are complaining inmase then Motorola will issue a patch to verizon to get out to the affected users.
    Of course now that Google owns Motorola Mobility and has laid off loads of workers it may never issue an os patch.

  • Hide "more" button in a list view, only works for first item in the list

    I have the following code in a list view that outputs several dozen items in a web app.  The code only works for the first item, how can I make it loop through and execute the test for each item in the list view?  The {tag_hide more button} is a checkmark field that yields a numeric 1" if checked otherwise yields a numeric "0".
    <div id="more-option">
            <p class="right"><a href="{tag_itemurl_nolink}" class="btn btn-small btn-very-subtle">More &rarr;</a></p>
          </div>
          <div class="more-selection" style="display: none;">{tag_hide more button}</div>
          <script>
    if ($(".more-selection").text() == "1") {
        $("#more-option").hide();
    </script>

    What's the URL for the site where you are using this?  Offhand, it looks like it should work with your first example so you are either placing the script before those elements are loaded or you might try wrapping your current javascript inside the:
    $(document).ready(function() {
    --- your existing javascript here
    This make sure the code runs once all the html is loaded on the page.  Without seeing a URL and debugging with the js console in Chrome I can't give you a solid answer.
    But, I do know that you can probably do this with a lot less markup.  Once we figure out what the actual problem is I have a better solution mocked up for you on jsfiddle.
    When looking at my HTML code on jsfiddle, please realize I setup some dummy HTML and removed your tags and added actual values which would be output by your tags.  The main thing I did was remove the whole div.more-selection and instead, added a "data-is-selected" attribute on your div.more-option element.  Then, in my javascript for each div.my-option element on the page, we loop through them, find the value of that data attribute and hide that div if it's less than 1 (or 0).
    Here's the fiddle for you to look at:  http://jsfiddle.net/thetrickster/Mfmdu/
    You'll see in the end result that only two divs show up, both of those divs have data-is-selected="1".
    You can try pasting the javascript code near the closing </body> tag on your page and make sure to wrap my js inside a <script> tag, obviously.  My way is neater on the markup side.  If you can't get it to work it's likely a jquery conflict issue.  My version is using the $(document).ready() method to make sure all the code is loaded before it runs.
    Best,
    Chris

  • After being dropped in water my Ipod will only work when hooked up to the computer or docking station.  It will not hold a charge.  What do I need to do?

    My son dropped his Ipod in some water, we put in a bag of rice overnight and it works fine when connected to the computer or docking statioon but it will not hold its charge once it is off the cable & not hooked up, so he cannot listen to it unhooked..  Any suggestions on what to do?  Thanks!!

    Take it to an Apple store. Most likely you will have to get a replacement for which you will be charged the replacement fee.
    Rice only absorbs water. But it cannot prevent damage to the device.

  • HT201412 My iphone will only work if it is on the charger. What do I do?

    My iphone 4S only will work on the charger. All of my settings are wrong. What do I do?

    Hi ashleybickel,
    Thanks for visiting Apple Support Communities.
    If your iPhone only works when connected to the charger, I recommend these troubleshooting steps:
    iPhone: Hardware troubleshooting
    http://support.apple.com/kb/TS2802
    Will not turn on, will not turn on unless connected to power, or unexpected power off
    Verify that the Sleep/Wake button functions. If it does not function, inspect it for signs of damage. If the button is damaged or is not functioning when pressed, seek service.
    Check if a Liquid Contact Indicator (LCI) is activated or there are signs of corrosion. Learn about LCIs and corrosion.
    Connect the iPhone to the iPhone's USB power adapter and let it charge for at least ten minutes.
    After at least 30 minutes, if:
    The home screen appears: The iPhone should be working. Update to the latest version of iOS if necessary. Continue charging it until it is completely charged and you see this battery icon in the upper-right corner of the screen . Then unplug the phone from power. If it immediately turns off, seek service.
    The low-battery image appears, even after the phone has charged for at least 20 minutes: See "iPhone displays the low-battery image and is unresponsive" symptom in this article.
    Something other than the Home screen or Low Battery image appears, continue with this article for further troubleshooting steps.
    If the iPhone did not turn on, reset it while connected to the iPhone USB power adapter.
    If the display turns on, go to step 4.
    If the display remains black, go to next step.
    Connect the iPhone to a computer and open iTunes. If iTunes recognizes the iPhone and indicates that it is in recovery mode, attempt to restore the iPhone. If the iPhone doesn't appear in iTunes or if you have difficulties in restoring the iPhone, see this article for further assistance.
    If restoring the iPhone resolved the issue, go to step 4. If restoring the iPhone did not solve the issue, seek service.
    Best,
    Jeremy

  • Problem: Cable Modem only give access to one, not the other

    I have been having a big problem with my internet connection. I have a Motorola SURFboard cable modem and an AirPort Extreme. From my cable modem I connect to my desktop computer with a USB cable. From my cable modem to my AirPort Extreme with an ethernet cable. For some reason all the appropriate lights are on the modem but only my AirPort Extreme connects thus allowing only my laptop to receive internet connection. I've everything I could think of. Does anyone here happen to know the problem?

    Hello TechDeprived. Welcome to the Apple Discussions!
    Does anyone here happen to know the problem?
    Yes, the Motorola SURFboard modem does NOT support simultaneously connecting devices to both its Ethernet and USB ports. You will have to choose one or the other for Internet access.

  • Our system for captioning only works now if we remove the textColor attribute. Why?

    We typically include the header elements as follows:
    {QTtext}{timescale:100}{size:16}{font:Arial}{justify:left}{backColor:0,0,0}{text Color:65535,65535,65535}
    {width:480}{height:100}
    [00:00:00]Music.
    But recently, we found we have to remove "{textColor:65535,65535,65535}" to be able to see the text. No big deal, except the text now appears justified center.
    What changed?

    spottedcatfish wrote:
    Here's the catch.  The line that is using the "Smartphones Talk Free" promo has to have a data package attached to it, which means that you would wind up in this situation:
    Your Number (Line 1) - Calling Plan + Data Package
    His Number (Line 2) - $9.99 + Data Package
    New Number (Line 3) - $0 + Data package (as long as the data package is kept on the line)
    You'd have to have 3 data packages, one to keep the promo, and then one on the lines with the smartphones active.  Contracts and promotions are tied to the phone number, so you can't switch the number or contract end date between lines.  If your husband wants to keep his number, the best thing to do will be to wait until he is eligible for an upgrade.
    If there is not a smartphone on line 2, but just a standard phone as was stated by the OP, you do not have to have a data plan on this line. To qualify for the smartphones talk free promotion, you do not have to have a data plan on all lines, just the lines you sign up with the offer for, i.e. just the primary line that is upgrading to the smartphone and the additional line that you are adding so that you can take advantage of the offer.
    If you do want to take advantage of the smartphone talk free offer, though, you will have to leave the smartphone on the line you sign up with. If you move the phone to your 2nd line, I believe that the discount will be stopped.

Maybe you are looking for

  • Safari won't open some secure pages

    It's not just Safari, though - Firefox, Chrome, Opera. It's not just my iMac either - MacBook Pro *AND* iPad. Some secure sites simply won't open.  It looks like they load (the timer thing goes through the URL) but blink - no page. Just a blank brows

  • HT201304 Where can I see a statement of my spending please?

    Does anyone know where I can see exactly how much the purchased apps have cost please?.

  • Prime 1.3 can't updates switches and wlc

    Hello. I have Prime 1.3, two WLC 5508 and 8 switches 2960s I try update my devices through Prime, but I can't. When I start "Upgrade Analysis" and select switche (Catalyst WS-C2960S-24PS-L) and image (c2960s-universalk9-mz.150-2.SE2.bin) then click t

  • Can some explain this to me

    Here is the code. import java.net.*; import java.util.*; import java.awt.*; import java.applet.AppletContext; import javax.swing.*; import javax.swing.event.*; import java.lang.String.*; import java.text.DateFormat; public class Headlines3 extends JA

  • Inner Join Subquery data display

    I have a query that uses a sub query on a INNER JOIN  SELECT  SUM(A.qtyord), A.Item, A.Description, A.Class, B.Forecast,                  CASE                          WHEN B.Forcast = 0                 THEN A.Item                  ELSE