Results 1 to 7 of 7
  1. #1
    supaarray is offline Member
    Join Date
    May 2011
    Posts
    1
    Rep Power
    0

    Default I'm going to make a memory match game using gridworld. HELP!

    I don't know how to conceal an image.
    When I run it, the pictures show up and my goal is to not make it show up because it's a memory game.

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    16,564
    Rep Power
    23

    Default

    Can you show the code that creates your problem.

  3. #3
    d3n1s is offline Member
    Join Date
    Apr 2011
    Posts
    69
    Rep Power
    0

    Default

    Not sure how you set this up, but you could do a grid of JPanels filled with JLabels and set the images as the icon of the JLabel. You could then simply set the icon to null when you want to hide it.

    Just food for thoughts...

  4. #4
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,189
    Rep Power
    19

    Default

    you could do a grid of JPanels filled with JLabels ...
    What's wrong with a grid of JLabels in a single JPanel?

    db

  5. #5
    d3n1s is offline Member
    Join Date
    Apr 2011
    Posts
    69
    Rep Power
    0

    Default

    I like having individual panels arranged in a grid, if you're going to put more than just a JLabel in it for example. Even if i only put one component i'll do it actually. I find it gives more control on the layout. But ultimately just a jpanel in a gridlayout would work just fine for what he wants to do.

  6. #6
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    25

    Default

    Original poster, I've added [code] [/code] tags to your post above so that the posted code will retain its formatting. If you are having specific problems with this code including error messages, exception, or missing functionality, it would be a great idea to post this information in this thread. Much luck!

  7. #7
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    16,564
    Rep Power
    23

    Default

    You need to read the documentation for the gridworld classes to see how to use them.

Similar Threads

  1. Memory Game Help
    By JordanJava1 in forum New To Java
    Replies: 7
    Last Post: 12-13-2010, 05:48 PM
  2. Replies: 2
    Last Post: 08-05-2010, 04:49 AM
  3. Memory game
    By ronyyy in forum New To Java
    Replies: 9
    Last Post: 04-15-2010, 11:00 AM
  4. Help to make memory game :=)
    By arian88 in forum AWT / Swing
    Replies: 7
    Last Post: 10-15-2009, 06:23 AM
  5. Memory Game
    By torres in forum AWT / Swing
    Replies: 6
    Last Post: 04-21-2009, 11:00 PM

Posting Permissions

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