dkim18
asked on
checkbox and border on one tab
hi!
I have an applet and there are JTabbedPane with 6 tabs.
One of them needs to contain one checkbox and titled border and the checkbox should be out side of titled border.
I have func that starts like this:
public void createSinDataPanel() {
sinDataPanel = new JPanel();
GridBagLayout layout = new GridBagLayout();
sinDataPanel.setLayout(lay out);
sinCheckBox = new JCheckBox("Sine plot");
sinDataPanel.add(sinCheckB ox);
..
..
..
My question is do I need to create another panel for checkbox?
I tried but no border appeared.
What layout do I have to use?
For sample, visit the following site, scroll down a bit, and select "Sin Data" tab.
http://webdev.apl.jhu.edu/~rbe/java/Homework4/index.html
Thanks,
I have an applet and there are JTabbedPane with 6 tabs.
One of them needs to contain one checkbox and titled border and the checkbox should be out side of titled border.
I have func that starts like this:
public void createSinDataPanel() {
sinDataPanel = new JPanel();
GridBagLayout layout = new GridBagLayout();
sinDataPanel.setLayout(lay
sinCheckBox = new JCheckBox("Sine plot");
sinDataPanel.add(sinCheckB
..
..
..
My question is do I need to create another panel for checkbox?
I tried but no border appeared.
What layout do I have to use?
For sample, visit the following site, scroll down a bit, and select "Sin Data" tab.
http://webdev.apl.jhu.edu/~rbe/java/Homework4/index.html
Thanks,
Sometimes java is rather straightforward, huh?
;-)
;-)
ASKER
>>One of them needs to contain one checkbox and titled border and the checkbox should be out side of titled border.
I need to create checkbox out side of border...
Add the checkbox and a NEW JPanel to the tab. Then set the border of the NEW JPanel
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Thank you
:)
:)
sinDataPanel = new JPanel();
sinDataPanel.setBorder( BorderFactory.createTitled
...