Search:

Type: Posts; User: cslx99

Search: Search took 0.22 seconds.

  1. Replies
    3
    Views
    1,061

    Re: Adding an array of shapes to a GUI window

    never mind got it working
  2. Replies
    11
    Views
    690

    Re: Setting constraints on a field

    so i took out the "getX();" line from the shape constructor:

    public Shape(int x, int y){
    this.x=x;
    this.y=y;
    }

    public int getX(){
    return...
  3. Replies
    11
    Views
    690

    Re: Setting constraints on a field

    quite honestly i have no idea why the "x=getX();" line is there, it was just my last effort in trying to get this to work. from my understanding, setX(); is supposed to set the new value for x. when...
  4. Replies
    11
    Views
    690

    Re: Setting constraints on a field

    so i got rid of the void. not sure why i had it there in the first place cuz i dont have it it any of my other constructors within my project. but i still cant seem to get the program to verify that...
  5. Replies
    11
    Views
    690

    Re: Setting constraints on a field

    so i have a book for java and a professor that say that the following are constructors:

    public Shape(){
    }

    &

    public void Shape(int x, int y){
    }
  6. Replies
    3
    Views
    1,061

    Re: Adding an array of shapes to a GUI window

    how bout this:

    public class Project6 extends JFrame{

    private static Shape [] thearray = new Shape[100]; // 100 Shapes, circle's, tri's and rects
    static MyPanel panel;

    public...
  7. Replies
    11
    Views
    690

    Re: Setting constraints on a field

    can you please clarify?
  8. Replies
    3
    Views
    1,061

    Adding an array of shapes to a GUI window

    I have to do the following steps:
    1) Project6 class will have to extend the JFrame class
    2) Project6 constructor will have to set up the GUI window.
    3) A new abstract method: public void...
  9. Replies
    11
    Views
    690

    Setting constraints on a field

    i am coding a project that has "Shape" as the parent with various shapes (ie rectangle, triangle, etc.) as sub-classes using inheritance. i am supposed "Modify the constructor and set methods of the...
  10. Re: Creating a Java Desktop Application in NetBeans

    I'm not sure what you mean by GUI builder but I hard coded everything. The screen in the picture is what popped up after I ran the code.
  11. Creating a Java Desktop Application in NetBeans

    Sorry, I'm fairly new with Java. I created a new project in NetBeans by selecting New Project --> Java Desktop Application. This is what NetBeans produced for me:...
Results 1 to 11 of 11