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 ^ |
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); } |
All times are GMT -5. The time now is 03:07 AM. |