Re: Using Copy (Ctrl-C) functionality with disabled JTextFields
From: Raymond DeCampo (rdecampo_at_hold-the-spam.twcny.rr.com)
Date: 11/25/03
- Next message: DaiIchi: "Re: Tomcat configuration question"
- Previous message: Brad BARCLAY: "Re: Using Copy (Ctrl-C) functionality with disabled JTextFields"
- In reply to: JMBollard: "Using Copy (Ctrl-C) functionality with disabled JTextFields"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 25 Nov 2003 01:29:17 GMT
JMBollard wrote:
> I am working on a Swing application (Java 1.4 ) and I am having
> trouble implementing the following functionality:
> A JTextField that should not be part of focus traversal (should
> not be tabbed to), but the text can be selected and copied (Ctrl-C).
>
> This is a requirement across the whole application, which is
> hundreds of panels, so 'hard-coding' the tab order is not an option.
>
I believe the best way to accomplish this is with the
Component.setFocusTraversalPolicy() method. You could pass it a
subclass of ContainerOrderFocusTraversalPolicy with an accept() method
that rejects all JTextFields.
HTH,
Ray
- Next message: DaiIchi: "Re: Tomcat configuration question"
- Previous message: Brad BARCLAY: "Re: Using Copy (Ctrl-C) functionality with disabled JTextFields"
- In reply to: JMBollard: "Using Copy (Ctrl-C) functionality with disabled JTextFields"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|