Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: Object Creation Help

  1. #1
    Junior Member
    Join Date
    Mar 2013
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Exclamation Object Creation Help

    I'm a first year computer science student and I created a maze out of about 200-300 different rectangles and need to make the maze one object altogether. I know how to make an object that is one rectangle and if I did that, I would be creating 200-300 objects. Is there a way to make my irregularly shaped maze one object? I need this to implement collision detection with the walls of the maze.


  2. #2
    Member angstrem's Avatar
    Join Date
    Mar 2013
    Location
    Ukraine
    Posts
    200
    My Mood
    Happy
    Thanks
    9
    Thanked 31 Times in 29 Posts

    Default Re: Object Creation Help

    Create a Maze class and extend it from JComponent. Than override paintComponent(Graphics) method and paint it using Graphics passed as an argument.

Similar Threads

  1. Image creation
    By alexpolo10 in forum Java IDEs
    Replies: 1
    Last Post: March 6th, 2013, 03:48 PM
  2. need help in program creation
    By vinaysa86 in forum Loops & Control Statements
    Replies: 4
    Last Post: August 15th, 2012, 07:11 PM
  3. Binary datafile and object creation according to binary tag ?
    By loicus in forum Object Oriented Programming
    Replies: 4
    Last Post: October 14th, 2011, 01:00 PM
  4. Reading from ResultSet to Object and from object Object Array
    By anmaston in forum What's Wrong With My Code?
    Replies: 4
    Last Post: April 7th, 2011, 06:11 AM
  5. Looping object creation
    By Charlie in forum Java Theory & Questions
    Replies: 5
    Last Post: June 19th, 2010, 11:12 AM

Tags for this Thread