//Menu Bar
EditorMenu menu = new EditorMenu(this);
setMenuBar(menu);
//rules list
BorderPanel plrules = new BorderPanel(BorderPanel.OUT, 5);
plrules.setLayout(new BorderLayout());
plrules.add(lrules);
thost = new TextField(20);
trule = new TextField(15);
trule.setEditable(false);
BorderPanel ptrule = new BorderPanel(BorderPanel.IN, 2);
ptrule.setLayout(new GridLayout(1,1));
ptrule.add(trule);
targs = new TextField(30);
// BAR 0
Panel plabel = new Panel();
plabel.add(new Label("Host: "));
Panel pcrule = new Panel(new BorderLayout());
pcrule.add(new Label("Rule: "), "West");
pcrule.add(crule, "Center");
Panel pcargs = new Panel(new BorderLayout());
pcargs.add(new Label("Args: "), "West");
pcargs.add(cargs, "Center");
BorderPanel phost = new BorderPanel(BorderPanel.IN,2);
phost.setLayout(new GridLayout(2,1));
phost.add(plabel);
phost.add(thost);
BorderPanel prule = new BorderPanel(BorderPanel.IN,2);
prule.setLayout(new GridLayout(2,1));
prule.add(pcrule);
prule.add(trule);
BorderPanel pargs = new BorderPanel(BorderPanel.IN,2);
pargs.setLayout(new GridLayout(2,1));
pargs.add(pcargs);
pargs.add(targs);
BorderPanel bar0 = new BorderPanel(BorderPanel.OUT,5);
bar0.setLayout(new GridLayout(1,3));
bar0.add(phost);
bar0.add(prule);
bar0.add(pargs);
// BAR 2
addB = new Button("Add Rule");
addB.setActionCommand("add");
addB.addActionListener(this);
replaceB = new Button("Replace Rule");
replaceB.setActionCommand("replace");
replaceB.addActionListener(this);
removeB = new Button("Remove Rule");
removeB.setActionCommand("remove");
removeB.addActionListener(this);
Panel bar2 = new Panel(new GridLayout(1,3));
bar2.add(addB);
bar2.add(replaceB);
bar2.add(removeB);
//Label location
location = new Label("Rules location: "+
editor.component.getRulesLocation());
BorderPanel ploc = new BorderPanel(BorderPanel.RAISED, 1);
ploc.setLayout(new FlowLayout());
ploc.add(location);
//Bar 2 & 3
BorderPanel bar2_3 = new BorderPanel(BorderPanel.OUT, 5);
bar2_3.setLayout(new GridLayout(2,1));
bar2_3.add(bar2);
bar2_3.add(ploc);
//subpanel
Panel subPanel = new Panel(new BorderLayout());
subPanel.add(plrules,"Center");
subPanel.add(bar0, "South");