Article View: be.comp.programming
Article #131Re: java-vraagje
From: Luc Kumps
Date: Sun, 28 Oct 2001 11:08
Date: Sun, 28 Oct 2001 11:08
33 lines
2053 bytes
2053 bytes
"Dietmar Hertsen" <dhertsen@mailandnews.com> wrote in message
news:3BDAB593.36E8D4B3@mailandnews.com...
> /** Constructor */
> public dialog(Frame f) {
>
> //Verwijderen
> BVerwijder.addActionListener(new ActionListener() {
> public void actionPerformed(ActionEvent e) {
> int row = Lijst.getSelectedIndex();
> if (row >= 0) {
> Lijst.remove(row);
> dialog dok = new dialog(this); //HIER IS HET DUS... cannot symbol
dialog...
Ik ben geen Java specialist, maar ik denk dat "this" op deze plaats verwijst
naar een object van type ActionListener, terwijl de constructor van dialog
een Frame verwacht.
Je kunt eventueel dit doen:
final Frame thisFrame = this;
//Verwijderen
BVerwijder.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
int row = Lijst.getSelectedIndex();
if (row >= 0) {
Lijst.remove(row);
dialog dok = new dialog(thisFrame);
Luc
Technical Details
Message-ID:
<oGRC7.10062$PH1.697@afrodite.telenet-ops.be>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!news.tele.dk!small.news.tele.dk!193.190.198.17!newsfeeds.belnet.be!news.belnet.be!ossa.telenet-ops.be!afrodite.telenet-ops.be.POSTED!not-for-mailReferences:
<3BDAB593.36E8D4B3@mailandnews.com>Show Full Headers
Complete Article Headers
X-Google-Language: DUTCH,ASCII-7-bit X-Google-Thread: 111c4c,6535a824c3f65b64 X-Google-Attributes: gid111c4c,public X-Google-Thread: fcea4,6535a824c3f65b64 X-Google-Attributes: gidfcea4,public X-Google-ArrivalTime: 2001-10-28 03:08:12 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!news.tele.dk!small.news.tele.dk!193.190.198.17!newsfeeds.belnet.be!news.belnet.be!ossa.telenet-ops.be!afrodite.telenet-ops.be.POSTED!not-for-mail From: "Luc Kumps" <NOkumpsSPAM@pandora.be> Newsgroups: be.comp.programming,be.comp References: <3BDAB593.36E8D4B3@mailandnews.com> Subject: Re: java-vraagje Lines: 36 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4807.1700 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700 Message-ID: <oGRC7.10062$PH1.697@afrodite.telenet-ops.be> Date: Sun, 28 Oct 2001 11:08:04 GMT NNTP-Posting-Host: 213.118.68.119 X-Complaints-To: abuse@pandora.be X-Trace: afrodite.telenet-ops.be 1004267284 213.118.68.119 (Sun, 28 Oct 2001 12:08:04 MET) NNTP-Posting-Date: Sun, 28 Oct 2001 12:08:04 MET Organization: Telenet Internet