Article View: borland.public.jbuilder.java.swing
Article #1789Re: Setting a myAction class object to a JMenuItem from the desiner
From: Alexei Akimov
Date: Wed, 23 Jul 2003 13:20
Date: Wed, 23 Jul 2003 13:20
32 lines
2039 bytes
2039 bytes
Dear Kostas,
You can test the following technique.
1. Declare actions as members of the frame class and create them outside the
frame constructor as anonymous classes
AbstractAction myAction = new AbstaractAction("My action name",myActionIcon)
{
public void actionPerformed(ActionEvent e) {
//place for your code
}
};
2. Open design tab, the actions are at the bottom of the structure pane. If
so you can use it in the object inspector.
Best regards,
Alexei Akimov
"Kostas" <karadamoglou_k@yahoo.gr> �������/�������� � �������� ���������:
news:3f1a79ac@newsgroups.borland.com...
> Hi all,
> I have develop an action class that implements AbstactAction. Is any way
to
> set an instance of this action to a JMenuItem from the designer? I can
make
> it explicitly from the code but i am afraid that it will be unreadable
from
> the designer. Can you give me a solution? I use JB8.
> Thank you all,
> Kostas
>
>
>
Technical Details
Message-ID:
<3f1e99c5@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-06!sn-xit-08!supernews.com!newsfeed.news2me.com!newsfeed.media.kyoto-u.ac.jp!newsfeed01.tsnz.net!news.xtra.co.nz!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<3f1a79ac@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII X-Google-Thread: 111d45,20b9aeef49f697cc X-Google-Attributes: gid111d45,public X-Google-ArrivalTime: 2003-07-23 07:31:31 PST From: "Alexei Akimov" <a_p_akimov@mtu-net.ru> Newsgroups: borland.public.jbuilder.java.swing References: <3f1a79ac@newsgroups.borland.com> Subject: Re: Setting a myAction class object to a JMenuItem from the desiner Date: Wed, 23 Jul 2003 17:20:52 +0400 Lines: 34 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 NNTP-Posting-Host: 212.188.97.209 Message-ID: <3f1e99c5@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1058970053 212.188.97.209 (23 Jul 2003 07:20:53 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-06!sn-xit-08!supernews.com!newsfeed.news2me.com!newsfeed.media.kyoto-u.ac.jp!newsfeed01.tsnz.net!news.xtra.co.nz!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail