I need to create some separators in a JPanel to separate buttons and
textfields and someone on here a few days ago said to just use a
JSeparator and add it to the JPanel. I did that and the separator
doesn't show up.
This is what I'm using:
panel.add(new JSeparator(0));
Other textfields, labels, and buttons I'm adding show up just fine but
the separator isn't so the rest of my code should be okay.
any ideas?
Lee Weiner - 22 Jul 2006 01:01 GMT
>I need to create some separators in a JPanel to separate buttons and
>textfields and someone on here a few days ago said to just use a
[quoted text clipped - 8 lines]
>
>any ideas?
You need to use .setPreferredSize() to give the separator a length greater
than 0.
Lee Weiner
lee AT leeweiner DOT org
Brandon McCombs - 26 Jul 2006 04:00 GMT
>> I need to create some separators in a JPanel to separate buttons and
>> textfields and someone on here a few days ago said to just use a
[quoted text clipped - 14 lines]
> Lee Weiner
> lee AT leeweiner DOT org
OK that worked. it was nice of the sun docs to (not) mention that.