Article View: borland.public.jbuilder.java.swing
Article #13275How to make an "Edit" menu
From: Erwin Bolwit
Date: Tue, 18 Aug 1998 00:00
Date: Tue, 18 Aug 1998 00:00
25 lines
1279 bytes
1279 bytes
Hi, I've been breaking my head over this: Is there a standard way to create an Edit-menu with cut, copy, and pastee in swing. I haven't found it. It is easy when there is one editorpane in your application, as the swing NotePad and StylePad show, but what if you use a more complex layout (possible CardLayout) with multiple JTextFields and JTextArea's? How to find out which component currently has the focus, and what to tell that component? Can I somehow send it the correct Action event, should I simulate a KeyEvent (but how to remain cross-platform with platforms that use different key bindings for Cut/Copy/Paste?) Unless I'm missing something obvious, it looks like something is missing from the Swing API. Anybody have a better experience? Erwin
Technical Details
Message-ID:
<35D99789.E71013F0@xs4all.nl>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,df4f2641fa650d7f,start X-Google-Attributes: gid111d45,public From: Erwin Bolwit <erwin@xs4all.nl> Subject: How to make an "Edit" menu Date: 1998/08/18 Message-ID: <35D99789.E71013F0@xs4all.nl> X-Deja-AN: 382309650 Content-Transfer-Encoding: 7bit X-Accept-Language: en Content-Type: text/plain; charset=us-ascii Organization: Project Buzz and ZAP! Mime-Version: 1.0 Newsgroups: borland.public.jbuilder.java.swing