Results 1 to 2 of 2
Thread: i get this error during compile
- 12-24-2011, 08:34 AM #1
Member
- Join Date
- Dec 2011
- Posts
- 5
- Rep Power
- 0
i get this error during compile
cannot resolve symbol
symbol:class windowAdapter
location:class mydlg
addWindowListener(new windowAdapter()
(same error in line 11 and 46)
This is my code
Java Code:import java.awt.*; import java.awt.event.*; public class dlgexp extends Frame implements ActionListener { Button b1; public dlgexp() { setLayout(new FlowLayout()); b1=new Button("Click"); add(b1); addWindowListener(new windowAdapter() { public void windowClosing(WindowEvent we) { dispose(); } }); b1.addActionListener(this); } public void actionPerformed(ActionEvent ae) { if(ae.getSource()==b1) { mydlg dd=new mydlg(this,"Subwindow",false); dd.setSize(200,200); dd.setVisible(true); } } public static void main(String arg[]) { dlgexp dd=new dlgexp(); dd.setSize(300,300); dd.setVisible(true); } } class mydlg extends Dialog { TextField f1; mydlg(Frame f,String t, boolean m) { super(f,t,m); setLayout(new FlowLayout()); f1=new TextField(20); add(f1); addWindowListener(new windowAdapter() { public void windowClosing(WindowEvent we) { dispose(); } }); } }Last edited by pbrockway2; 12-24-2011 at 08:49 AM. Reason: code tags added
- 12-24-2011, 08:43 AM #2
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,372
- Blog Entries
- 7
- Rep Power
- 17
Similar Threads
-
compile error
By missmara77 in forum New To JavaReplies: 1Last Post: 10-31-2011, 07:48 PM -
Compile Error
By gcorreageek in forum Advanced JavaReplies: 2Last Post: 09-08-2010, 05:23 AM -
compile error
By angryredantz in forum New To JavaReplies: 1Last Post: 01-23-2009, 10:44 PM -
Compile Error - Please Help!!
By AJ2009 in forum New To JavaReplies: 10Last Post: 01-04-2009, 03:59 PM -
compile error
By dirtycash in forum New To JavaReplies: 6Last Post: 12-12-2007, 06:00 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks