Results 1 to 3 of 3
  1. #1
    bluej is offline Member
    Join Date
    Jan 2012
    Rep Power

    Default Storing data in Array List


    I would really appreciate it if I can get some help with this...

    I have a simple program that I already wrote the code for (attached). In the program I choose a shape from a list of shapes and I can change its colorr, move it around and make it bigger and smaller. I am now supposed to add a store button. When store is button is pressed it should store the currently selected shapes etc. in an ArrayList

    I attached the code and in the beginning I included a more detailed description of what the program does and what I am supposed to do.

    Please take a look and tell me how this should be done.

    I understand that I will need to create a new class and declare the array list in it or something of the sort but not so sure how to go around it.

    Thank you!!!
    Attached Files Attached Files

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Madgaon, Goa, India
    Rep Power

    Default Re: Storing data in Array List

    You abandoned the first thread you started, without replying to JosAH's response. Why should we expect anything different here?

    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  3. #3
    bluej is offline Member
    Join Date
    Jan 2012
    Rep Power

    Default Re: Storing data in Array List

    I said in the question:
    -The class is not abstract and does not override abstract method stateChanged in ChangeListener (I need the interface ChangeListener for my slider!)
    -Method setColor(java.awt.Color) has not been declared (not sure how/what I should declare)
    & he replied:
    - implement the stateChanged( ... ) method in your class because it promised to be a ChangeListener (declared by the interface).
    - define a method setColor( ... )

    His response was very brief and mostly what I mentioned in the question. I was going to reply asking if he can elaborate but I figured it out shortly after. I'm sorry for "abandoning" it, didn't realize this was a big deal. Well, I should've thanked him...
    I must say this was a very strange response from you, took me by surprised
    If you can help me with this that would be great
    Thanks in advance!
    Last edited by bluej; 01-30-2012 at 05:27 AM.

Similar Threads

  1. Storing objects in an array list?
    By Moedig in forum New To Java
    Replies: 3
    Last Post: 10-27-2011, 06:39 PM
  2. Storing Mutiple Classes/Data Types in a Linked List
    By Chronoattica in forum New To Java
    Replies: 7
    Last Post: 12-28-2010, 10:03 PM
  3. Storing data?
    By Syntax in forum New To Java
    Replies: 4
    Last Post: 01-23-2010, 01:17 AM
  4. Replies: 1
    Last Post: 12-03-2009, 07:03 AM
  5. Storing Data
    By Khorod in forum New To Java
    Replies: 1
    Last Post: 08-03-2007, 05:48 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts