Search:

Type: Posts; User: KevinWorkman

Search: Search took 0.11 seconds.

  1. Re: Trying to add text from a string to the name of a JPanel (is it possible?)

    Nope. I mean add them to a List, such as an ArrayList.

    Recommended reading: Trail: Collections (The Java™ Tutorials)

    You could also just have an array of JPanels instead of storing their names...
  2. Re: Trying to add text from a string to the name of a JPanel (is it possible?)

    What? No, if you add them to a List, you can just iterate over the List instead of iterating over an array of variable names. You shouldn't have any repeated code.
  3. Re: Trying to add text from a string to the name of a JPanel (is it possible?)

    You can't really do that. You could have a Map of variable names to JPanels, though. Or you could just add them all to a List.
Results 1 to 3 of 3