Problem with updating my GUI

Discussion in 'Java' started by SuperDrops, Apr 25, 2012.

  1. SuperDrops

    SuperDrops

    Joined:
    Apr 25, 2012
    Messages:
    1
    So I have a GUI intended for a game. In the game you go through several rooms. Whenever you enter a new room you get as many Buttons as there are exits to the room, logically one for each. That is the theory however. I have managed to set it up so the buttons are dynamically generated according to the number of exits to the room, and have the new Buttons drawn. However, they are layered behind the OLD toolbar (which includes two lists and another panel intended for Buttons later on) and the old toolbar stays rigid in its place. When I resize the window the NEW toolbar resizes along with it, but the OLD toolbar stays in the exact same spot, even if I resize the frame so it is no longer on it and then return it to original size it is still there. I've read stuff about validating and revalidating and removing and packing, but none of that seemed to help, though I'm really unsure at what point I need to do any of that. I can post the entirety of my code here, but me being german it contains some german names, also it is pretty amateurish code. So yeah. Can anyone help?
     
    SuperDrops, Apr 25, 2012
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. paul.foreman

    GUI - GUI value passing

    paul.foreman, Oct 22, 2004, in forum: Java
    Replies:
    5
    Views:
    772
    Michael Rauscher
    Oct 25, 2004
  2. James Gralton
    Replies:
    3
    Views:
    5,458
    Andrew Thompson
    Aug 2, 2005
  3. Gheorghe Postelnicu

    Question about updating in a GUI

    Gheorghe Postelnicu, Feb 21, 2007, in forum: Python
    Replies:
    0
    Views:
    208
    Gheorghe Postelnicu
    Feb 21, 2007
  4. Jason Cavett

    Updating GUI Components From A Thread

    Jason Cavett, Apr 4, 2007, in forum: Java
    Replies:
    5
    Views:
    616
    Brandon McCombs
    Apr 7, 2007
  5. news.rcn.com
    Replies:
    2
    Views:
    1,148
    Roedy Green
    Dec 10, 2007
Loading...

Share This Page