Hello,
I'm trying to set up a panel with a group layout, and I wanted to know if I could code my groups like this:
GroupLayout menuLayout = new GroupLayout(menu);
menu.setLayout(menuLayout);
menuLayout.setHorizontalGroup(
menuLayout.createParallelGroup(GroupLayout.Alignme nt.LEADING)
mainDishes = new JLabel();
mainDishes.setFont(new Font("SansSerif", 1, 14));
mainDishes.setForeground(new Color(0,0,0));
mainDishes.setHorizontalAlignment(SwingConstants.C ENTER);
mainDishes.setText("Main Dishes");
menuPanel.add(mainDishes);
.addComponent(mainDishes, GroupLayout.Alignment.TRAILING, GroupLayout.DEFAULT_SIZE, 324, Short.MAX_VALUE)
Where I'm setting my group and then adding the components of my panel to each group respectivly, or something to that effect. I designed this in NetBeans, and I'm copying the code into TextPad because there are several things I don't understand about NetBeans and I don't have time to figure them all out before my assignment is due. Anyway, I'm looking for the most efficient way to code this, any suggestions would be appreciated.