Search:

Type: Posts; User: Norm

Search: Search took 0.11 seconds.

  1. Replies
    8
    Views
    1,664

    Re: JPanel new FlowLayout

    The first way assigns a reference to a variable that can be used elsewhere. The second way does not. They both create an instance of the class.
    newClass.getSomething(new Whatever()); // Added...
  2. Replies
    8
    Views
    1,664

    Re: JPanel new FlowLayout

    You use new to create an instance of a class. What you just said does not make sense.
  3. Replies
    8
    Views
    1,664

    Re: JPanel new FlowLayout

    That would be what the programmer that wrote the method would define and take care of. By class I assume you mean an instance of a class.




    public void setLayout(object layout)

    That...
  4. Replies
    8
    Views
    1,664

    Re: JPanel new FlowLayout

    You use new to create a new instance of a class. Using FlowLayout() without new looks like a call to a method not a call to make a new instance of a class.
Results 1 to 4 of 4