JDK-4200562 : Adding Mnemonic to JTabbedPane titles
  • Type: Enhancement
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 1.1.6,1.2.0,1.3.0
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic,windows_nt
  • CPU: generic,x86
  • Submitted: 1999-01-05
  • Updated: 2000-12-18
  • Resolved: 2000-12-18
Related Reports
Duplicate :  
Description

Name: dbT83986			Date: 01/04/99


The titles in a JTabbedPane should be buttons, so I can
setMnemonic on them.

As it stands, applications with tabbed panes can't be driven
from the keyboard effectively.
(Review ID: 48782)
======================================================================

Name: skT88420			Date: 11/10/99


java version "1.3beta"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3beta-O)
Java(TM) HotSpot Client VM (build 1.3beta-O, mixed mode)

A user should be able to press a hotkey to access a component such as a
JTextArea. If this component is enclosed inside a JPanel with a TitledBorder,
that border should have a mnemonic allowing the component to have its focus
requested.

It's not always appropriate to have a JLabel next to such a component; nor
should it be necessary.

I suggest adding the methods:

setDisplayedMnemonic(char aChar); and
setLabelFor(Component component); etc, as in JLabel

to the TitledBorder class.


(see also 4200562, a similar request for mnemonics on tabs)
(Review ID: 97711)
======================================================================

Comments
WORK AROUND Name: skT88420 Date: 11/10/99 Create a dummy JLabel with the same mnemonic as the one you wish to have on the border, calling its setLabelFor method. However, making it invisible seems to disable the mnemonic. (Review ID: 97711) ======================================================================
11-06-2004

EVALUATION I agree that we ought to support mnemonics in tabs on JTabbedPane. amy.fowler@Eng 2000-03-09 This was implemented for Merlin via 4284674, which I am closing this as a duplicate of. scott.violet@eng 2000-12-18 It was pointed out this bug actually has two requests. The first is for mnemonic support on JTabbedPane, which has been addressed with 4284674. The second part is to add mnemonic support to TitleBorder. This does not fit with the current architecture and will not be added. scott.violet@eng 2001-05-14
14-05-2001