Changing JFrame components at runtime



In my JFrame I have a JPanel's extension class with a 2-dimensional
array of 3X3 JLabels.
This array is, of course, created in initComponents() of MyPanel class.
I've put a menu item in which user can change the dimension of JLabels'
grid.
If, e.g., the user chooses 4 then MyPanel should change that grid to a
4x4 array of JLabels.
How can I do that? Can I invoke again initComponents() methods of
MyPanel and JFrame?
Thanks.

.



Relevant Pages

  • Re: Changing JFrame components at runtime
    ... This array is, of course, created in initComponents ... Which IDE are you using? ... all better names for this than MyPanel - mostly ... I've put a menu item in which user can change the dimension of JLabels' ...
    (comp.lang.java.gui)
  • Re: Array of JLabels
    ... I want to create an array of JLabels like this: ... you create a set of 25 reference holder that can hold a reference to a JLabel but you are not constructing JLabels. ...
    (comp.lang.java.programmer)
  • Re: How to put JLabels in an array?
    ... >> I'm trying to put 10 JLabels in an array, ... >array, you need only say: ... the universally adopted naming conventions for Java ... So if you intend to work in Java, ...
    (comp.lang.java.help)