/**
  * Layout
  *
  * @throws Exception
  */
 private void jbInit() throws Exception {
   this.getContentPane().setLayout(mainLayout);
   this.getContentPane().add(centerPanel, BorderLayout.CENTER);
   this.getContentPane().add(confirmPanel, BorderLayout.SOUTH);
   centerPanel.setLayout(centerLayout);
   //
   confirmPanel.setActionListener(this);
 } // jbInit
示例#2
0
 /**
  * Static Init
  *
  * @throws Exception
  */
 private void jbInit() throws Exception {
   CompiereColor.setBackground(panel);
   newBorder = new TitledBorder("");
   accountBorder = new TitledBorder("");
   mainPanel.setLayout(mainLayout);
   newPanel.setBorder(newBorder);
   newPanel.setLayout(newLayout);
   newBorder.setTitle(Msg.getMsg(Env.getCtx(), "ChargeNewAccount"));
   valueLabel.setText(Msg.translate(Env.getCtx(), "Value"));
   isExpense.setSelected(true);
   isExpense.setText(Msg.getMsg(Env.getCtx(), "Expense"));
   nameLabel.setText(Msg.translate(Env.getCtx(), "Name"));
   nameField.setColumns(20);
   valueField.setColumns(10);
   newButton.setText(
       Msg.getMsg(Env.getCtx(), "Create") + " " + Util.cleanAmp(Msg.getMsg(Env.getCtx(), "New")));
   newButton.addActionListener(this);
   accountPanel.setBorder(accountBorder);
   accountPanel.setLayout(accountLayout);
   accountBorder.setTitle(Msg.getMsg(Env.getCtx(), "ChargeFromAccount"));
   accountButton.setText(
       Msg.getMsg(Env.getCtx(), "Create")
           + " "
           + Msg.getMsg(Env.getCtx(), "From")
           + " "
           + Msg.getElement(Env.getCtx(), "Account_ID"));
   accountButton.addActionListener(this);
   accountOKPanel.setLayout(accountOKLayout);
   accountOKLayout.setAlignment(FlowLayout.RIGHT);
   confirmPanel.setActionListener(this);
   //
   mainPanel.add(newPanel, BorderLayout.NORTH);
   newPanel.add(
       valueLabel,
       new GridBagConstraints(
           0,
           0,
           1,
           1,
           0.0,
           0.0,
           GridBagConstraints.EAST,
           GridBagConstraints.NONE,
           new Insets(5, 5, 5, 5),
           0,
           0));
   newPanel.add(
       valueField,
       new GridBagConstraints(
           1,
           0,
           1,
           1,
           0.0,
           0.0,
           GridBagConstraints.WEST,
           GridBagConstraints.NONE,
           new Insets(5, 0, 5, 5),
           0,
           0));
   newPanel.add(
       nameLabel,
       new GridBagConstraints(
           0,
           1,
           1,
           1,
           0.0,
           0.0,
           GridBagConstraints.EAST,
           GridBagConstraints.NONE,
           new Insets(5, 5, 5, 5),
           0,
           0));
   newPanel.add(
       nameField,
       new GridBagConstraints(
           1,
           1,
           1,
           1,
           0.0,
           0.0,
           GridBagConstraints.WEST,
           GridBagConstraints.NONE,
           new Insets(5, 0, 5, 5),
           0,
           0));
   newPanel.add(
       isExpense,
       new GridBagConstraints(
           2,
           0,
           1,
           1,
           0.0,
           0.0,
           GridBagConstraints.WEST,
           GridBagConstraints.NONE,
           new Insets(5, 5, 5, 5),
           0,
           0));
   newPanel.add(
       newButton,
       new GridBagConstraints(
           2,
           1,
           1,
           1,
           0.0,
           0.0,
           GridBagConstraints.CENTER,
           GridBagConstraints.NONE,
           new Insets(5, 5, 5, 5),
           0,
           0));
   mainPanel.add(accountPanel, BorderLayout.CENTER);
   accountPanel.add(accountOKPanel, BorderLayout.SOUTH);
   accountOKPanel.add(accountButton, null);
   accountPanel.add(dataPane, BorderLayout.CENTER);
   dataPane.getViewport().add(dataTable, null);
 } //  jbInit