Re: adding a List of JTextField to the GUI
- From: Mark Space <markspace@xxxxxxxxxxxxxx>
- Date: Sun, 27 Jul 2008 00:12:52 -0700
thufir wrote:
center.add(field); //Why isn't it adding??
center.setLayout(centerLayout);
I'm not sure, but reading your code I'll take a guess. You add the JTextFields to the JPanel's ("center") default FlowLayout, then you toss that away when you set a new layout manager to the new GroupLayout. Hence, the JPanel ends up with no components.
Try setting the layout manager before the for loop.
.
- Follow-Ups:
- Re: adding a List of JTextField to the GUI
- From: Mark Space
- Re: adding a List of JTextField to the GUI
- References:
- adding a List of JTextField to the GUI
- From: thufir
- adding a List of JTextField to the GUI
- Prev by Date: adding a List of JTextField to the GUI
- Next by Date: Re: adding a List of JTextField to the GUI
- Previous by thread: adding a List of JTextField to the GUI
- Next by thread: Re: adding a List of JTextField to the GUI
- Index(es):
Relevant Pages
|