LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 04-15-2003, 10:15 AM   #1
JIV
Member
 
Registered: Feb 2003
Location: India
Distribution: RedHat 9.0
Posts: 90

Rep: Reputation: 15
Java compilation problem


error in inheriting java.awt.Dialog

import java.awt.*;

public class Textdialog extends Dialog {
TextField tf;
BaseFrame2 theFrame;
Textdialog (Frame parent, String title, boolean modal) {
theFrame = (BaseFrame2)parent;
setLayout(new BorderLayout(10,10));
setBackground(Color.white);
tf = new TextField(theFrame.message,20);
add("Center",tf);
Button b = new Button("OK");
add("South",b);
}
public Insets insets() {
return new Insets(30,10,10,10);
}
}


Textdialog.java:7: cannot resolve symbol
symbol : constructor Dialog ()
location: class java.awt.Dialog
Textdialog (Frame parent, String title, boolean modal) {
1 error ^
 
Old 06-02-2003, 10:39 AM   #2
zmedico
Member
 
Registered: Feb 2002
Location: Mission Viejo, California, USA
Distribution: Gentoo
Posts: 707

Rep: Reputation: 30
Your Textdialog class needs a constructor that calls one of the existing constructors of the Dialog superclass. For example:

public Textdialog(Frame owner){
super(owner);
}
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
C++ Compilation problem with G++ nelnel Programming 6 07-06-2005 09:58 PM
help neede with java source file compilation max_rsr Programming 2 05-16-2005 09:35 PM
Java compilation path Azzath Programming 4 02-02-2005 06:35 PM
c compilation problem edreddy Programming 5 06-02-2004 12:37 PM
Compilation problem... need help Korshun Programming 2 05-07-2002 12:33 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 10:40 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration