Search:

Type: Posts; User: helloworld922

Search: Search took 0.07 seconds.

  1. Replies
    12
    Views
    2,418

    Re: issues with Class

    I believe you're running into issues with using == on Strings (didn't take a closer look, but this is usually the problem).

    See: Common Java Mistakes: == operator or equals() method

    Again,...
  2. Replies
    12
    Views
    2,418

    Re: issues with Class

    mmm, you've partially got it. You still have the empty method "Constructor". This is not needed (unless you're planning on doing something else with this method). Secondly, You still haven't set the...
  3. Replies
    12
    Views
    2,418

    Re: issues with Class

    Here's an example of what I'm talking about. I'll leave it up to you to figure out how to apply this to your problem.

    public class MyClass extends JFrame
    {
    int parameter;

    public...
  4. Replies
    12
    Views
    2,418

    Re: issues with Class

    the notFound method is not your constructor. You only use super(params) as the first line of the constructor.

    Constructors are defined as a method with the class name, not the word "constructor"....
  5. Replies
    12
    Views
    2,418

    Re: issues with Class

    You can use the super construct in conjunction with any regular constructor code. The only pre-requisite is that the super construct must be the first line.

    public MyClass(String message, int...
  6. Replies
    12
    Views
    2,418

    Re: issues with Class

    Accessing stuff from the parent class can be done using the super construct. By default Java will always try to call super(), but if you provide your own super declaration you can over-ride this...
Results 1 to 6 of 6