Java addWindowListener syntax error -


I'm looking for Google in the morning and this website, but I really do not know what I'm doing wrong. I have created a class (walboard) and I am trying to call it, but when it is compiled, there are errors on "add-window listener".

This is the error that I get:

  Error: The constructor wallboard version can not be applied to the type of wallboard given; AddWindowListener (new wardboard (this)); ^ Required: No argument found: The reason for the wallboard: The actual and formal logic lists vary in length   

And this is the code:

  Public class Runabout extends to the Walboard JFrame {JLabel WbText; Applies; Thread t = null; String [] textLine = new string [4]; Public wallboard () {setUndecorated (true); SetExtendedState (6); . GetContentPane () setBackground (Color.BLACK); GetContentPane () SetCursor (Toolkit.getDefaultToolkit (). CreateCustomCursor (new BufferedImage (16, 16, 2), new point (0, 0), blank)); SetVisible (true); This.WbText = new JLabel ("0123456789012345", 0); This.WbText.setFont (new font ("Monospaced", 1, getWidth () * 18/160)); This.WbText.setHorizontalTextPosition (0); This.WbText.setVerticalTextPosition (0); Add (this.WbText); AddWindowListener (new wardboard (this)); This.t = new thread (this); This.t.start (); }   

Can anyone help me? What am i doing wrong

Many thanks for your input.

It looks like your constructor does not have any logic:

  Public Wallboard () {setUndecorated (true); SetExtendedState (6); ...   

and then try calling it using this code as this asn logic:

  addWindowListener (new Wardboard (it));   

inside the new wallboard (this) addWindowsListener () instead of WindowListener apply something else Should>. Try it instead:

  addWindowListener (new windolister () {});    

Comments

Popular posts from this blog

java - ImportError: No module named py4j.java_gateway -

python - Receiving "KeyError" after decoding json result from url -

.net - Creating a new Queue Manager and Queue in Websphere MQ (using C#) -