Hi! I hope someone could help:
I defined a BoxLayout JPanel because I need to show in this order:
a checkbox
a textfield
another checkbox
another texfield
and this works fine:
JPanel jPanelBoEx = new JPanel();
jPanelVars.add(jPanelBoEx, BorderLayout.LINE_START);
jPanelBoEx.setLayout(new BoxLayout(jPanelBoEx, BoxLayout.PAGE_AXIS));
jPanelBoEx.add(jchkbox1);
jPanelBoEx.add(jTextField1);
jPanelBoEx.add(jchkbox2);
jPanelBoEx.add(jTextField2);
But I need not to show them in the center, they must be shifted some position to the right so I use this:
jPanelBoEx.setBorder(BorderFactory.createEmptyBord er(0, 160, 0, 0));
To shift the four of them to the right, but I need the two textfields to be more to the right than the 2 checkboxes..
But I can't find how to "move" the textfields to a different position than the checkboxes.. I can only position the 4 of them toguether, is there a way?
Thanks in advance.