예제 #1
0
 public GuiLogOutputHandler(JTextArea jtextarea)
 {
     field_998_b = new int[1024];
     field_1001_c = 0;
     field_999_a = new GuiLogFormatter(this);
     setFormatter(field_999_a);
     field_1000_d = jtextarea;
 }
예제 #2
0
파일: ServerGUI.cs 프로젝트: riverar/Crafty
 private JComponent getLogComponent()
 {
     var jpanel = new JPanel(new BorderLayout());
     var jtextarea = new JTextArea();
     logger.addHandler(new GuiLogOutputHandler(jtextarea));
     var jscrollpane = new JScrollPane(jtextarea, 22, 30);
     jtextarea.setEditable(false);
     var jtextfield = new JTextField();
     jtextfield.addActionListener(new ServerGuiCommandListener(this, jtextfield));
     jtextarea.addFocusListener(new ServerGuiFocusAdapter(this));
     jpanel.add(jscrollpane, "Center");
     jpanel.add(jtextfield, "South");
     jpanel.setBorder(new TitledBorder(new EtchedBorder(), "Log and chat"));
     return jpanel;
 }
예제 #3
0
 private JPanel createLicencePanel()
 {
   JPanel.__\u003Cclinit\u003E();
   JPanel jpanel = new JPanel((LayoutManager) new BorderLayout());
   JTextArea.__\u003Cclinit\u003E();
   JTextArea jtextArea = new JTextArea(this.licence);
   jtextArea.setLineWrap(true);
   jtextArea.setWrapStyleWord(true);
   ((JTextComponent) jtextArea).setCaretPosition(0);
   ((JTextComponent) jtextArea).setEditable(false);
   ((Container) jpanel).add((Component) new JScrollPane((Component) jtextArea));
   return jpanel;
 }