private void JbInit() { //pf = new PrintFile("out"); this.AddWindowListener(new _WindowAdapter_110()); //Set up the input/output fields and let them scroll. inputBox.SetLineWrap(true); inputBox.SetWrapStyleWord(true); outputBox.SetLineWrap(true); outputBox.SetWrapStyleWord(true); outputBox.SetEditable(false); JScrollPane scroll1 = new JScrollPane(inputBox); JScrollPane scroll2 = new JScrollPane(outputBox); scroll1.SetBorder(BorderFactory.CreateTitledBorder(BorderFactory.CreateEtchedBorder(), "Type a sentence to tag: ")); scroll2.SetBorder(BorderFactory.CreateTitledBorder(BorderFactory.CreateEtchedBorder(), "Tagged sentence: ")); //Set up the button for starting tagging JPanel buttonPanel = new JPanel(); buttonPanel.SetBackground(Color.White); buttonPanel.ApplyComponentOrientation(ComponentOrientation.RightToLeft); FlowLayout fl = new FlowLayout(); fl.SetAlignment(FlowLayout.Right); buttonPanel.SetLayout(fl); tagButton.SetText("Tag sentence!"); tagButton.SetBackground(Color.White); buttonPanel.Add(tagButton); tagButton.AddActionListener(null); //Lay it all out this.SetLayout(new GridBagLayout()); GridBagConstraints c = new GridBagConstraints(); c.fill = GridBagConstraints.Both; c.gridwidth = GridBagConstraints.Remainder; c.weightx = 4.0; c.weighty = 4.0; this.Add(scroll1, c); c.weighty = 1.0; this.Add(buttonPanel, c); c.weighty = 4.0; c.gridheight = GridBagConstraints.Remainder; this.Add(scroll2, c); }