javax.swing.GroupLayout.createSequentialGroup()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(21.2k)|赞(0)|评价(0)|浏览(100)

本文整理了Java中javax.swing.GroupLayout.createSequentialGroup()方法的一些代码示例,展示了GroupLayout.createSequentialGroup()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。GroupLayout.createSequentialGroup()方法的具体详情如下:
包路径:javax.swing.GroupLayout
类名称:GroupLayout
方法名:createSequentialGroup

GroupLayout.createSequentialGroup介绍

暂无

代码示例

代码示例来源:origin: kiegroup/optaplanner

public MachineReassignmentPanel() {
  GroupLayout layout = new GroupLayout(this);
  setLayout(layout);
  createMachineListPanel();
  JPanel headerPanel = new JPanel();
  layout.setHorizontalGroup(layout.createParallelGroup()
      .addComponent(headerPanel).addComponent(machineListPanel));
  layout.setVerticalGroup(layout.createSequentialGroup()
      .addComponent(headerPanel, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE,
          GroupLayout.PREFERRED_SIZE)
      .addComponent(machineListPanel, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE,
          GroupLayout.PREFERRED_SIZE));
}

代码示例来源:origin: org.metawidget.modules/metawidget-all

@Override
public void onEndBuild( SwingMetawidget metawidget ) {
  // Buttons
  Facet facetButtons = metawidget.getFacet( "buttons" );
  if ( facetButtons != null ) {
    State state = getState( metawidget );
    javax.swing.GroupLayout groupLayout = (javax.swing.GroupLayout) metawidget.getLayout();
    state.groupHorizontal.addGroup( groupLayout.createSequentialGroup().addComponent( facetButtons ) );
    state.groupVertical.addGap( COMPONENT_GAP, COMPONENT_GAP, COMPONENT_GAP );
    state.groupVertical.addGroup( groupLayout.createParallelGroup( Alignment.BASELINE ).addComponent( facetButtons ) );
  }
}

代码示例来源:origin: kiegroup/optaplanner

public NurseRosteringPanel() {
  employeeIcon = new ImageIcon(getClass().getResource("employee.png"));
  deleteEmployeeIcon = new ImageIcon(getClass().getResource("deleteEmployee.png"));
  GroupLayout layout = new GroupLayout(this);
  setLayout(layout);
  createEmployeeListPanel();
  JPanel headerPanel = createHeaderPanel();
  layout.setHorizontalGroup(layout.createParallelGroup()
      .addComponent(headerPanel).addComponent(employeeListPanel));
  layout.setVerticalGroup(layout.createSequentialGroup()
      .addComponent(headerPanel, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE,
          GroupLayout.PREFERRED_SIZE)
      .addComponent(employeeListPanel, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE,
          GroupLayout.PREFERRED_SIZE));
}

代码示例来源:origin: kiegroup/optaplanner

public CloudBalancingPanel() {
  cloudComputerIcon = new ImageIcon(getClass().getResource("cloudComputer.png"));
  addCloudComputerIcon = new ImageIcon(getClass().getResource("addCloudComputer.png"));
  deleteCloudComputerIcon = new ImageIcon(getClass().getResource("deleteCloudComputer.png"));
  cloudProcessIcon = new ImageIcon(getClass().getResource("cloudProcess.png"));
  addCloudProcessIcon = new ImageIcon(getClass().getResource("addCloudProcess.png"));
  deleteCloudProcessIcon = new ImageIcon(getClass().getResource("deleteCloudProcess.png"));
  GroupLayout layout = new GroupLayout(this);
  setLayout(layout);
  JPanel headerPanel = createHeaderPanel();
  JPanel computersPanel = createComputersPanel();
  layout.setHorizontalGroup(layout.createParallelGroup()
      .addComponent(headerPanel).addComponent(computersPanel));
  layout.setVerticalGroup(layout.createSequentialGroup()
      .addComponent(headerPanel, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE,
          GroupLayout.PREFERRED_SIZE)
      .addComponent(computersPanel, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE,
          GroupLayout.PREFERRED_SIZE));
}

代码示例来源:origin: runelite/runelite

BookPanel(Book b)
{
  setBorder(new EmptyBorder(3, 3, 3, 3));
  setBackground(ColorScheme.DARK_GRAY_COLOR);
  GroupLayout layout = new GroupLayout(this);
  this.setLayout(layout);
  JLabel image = new JLabel();
  b.getIcon().addTo(image);
  JLabel name = new JLabel(b.getShortName());
  location.setFont(FontManager.getRunescapeSmallFont());
  layout.setVerticalGroup(layout.createParallelGroup()
    .addComponent(image)
    .addGroup(layout.createSequentialGroup()
      .addComponent(name)
      .addComponent(location)
    )
  );
  layout.setHorizontalGroup(layout.createSequentialGroup()
    .addComponent(image)
    .addGap(8)
    .addGroup(layout.createParallelGroup()
      .addComponent(name)
      .addComponent(location)
    )
  );
  // AWT's Z order is weird. This put image at the back of the stack
  setComponentZOrder(image, getComponentCount() - 1);
}

代码示例来源:origin: deathmarine/Luyten

layout.setHorizontalGroup(
    layout.createSequentialGroup().addComponent(label)
        .addGroup(
            layout.createParallelGroup(Alignment.LEADING).addComponent(statusLabel)
                .addComponent(textField)
                .addGroup(layout.createSequentialGroup()
                    .addGroup(layout.createParallelGroup(Alignment.LEADING)
                        .addComponent(mcase))
                .addGroup(layout.createParallelGroup(Alignment.LEADING).addComponent(wholew))
                .addGroup(layout.createParallelGroup(Alignment.LEADING).addComponent(regex))
                .addGroup(layout.createParallelGroup(Alignment.LEADING).addComponent(classname)))
    .addGroup(layout.createSequentialGroup()
        .addGroup(layout.createParallelGroup(Alignment.LEADING).addComponent(listScroller)
            .addComponent(progressBar))))
layout.setVerticalGroup(layout.createSequentialGroup()
    .addGroup(layout.createParallelGroup(Alignment.BASELINE).addComponent(label).addComponent(textField)
        .addComponent(findButton))
        .addComponent(regex).addComponent(classname))
    .addGroup(layout.createParallelGroup(Alignment.LEADING)
        .addGroup(layout.createSequentialGroup()
            .addGroup(layout.createParallelGroup(Alignment.BASELINE).addComponent(listScroller))))
    .addGroup(layout.createParallelGroup(Alignment.LEADING)).addComponent(statusLabel)
    .addComponent(progressBar));
this.adjustWindowPositionBySavedState();
this.setSaveWindowPositionOnClosing();

代码示例来源:origin: deathmarine/Luyten

this.setResizable(false);
GroupLayout layout = new GroupLayout(getRootPane());
getRootPane().setLayout(layout);
layout.setAutoCreateGaps(true);
layout.setAutoCreateContainerGaps(true);
layout.setHorizontalGroup(layout.createSequentialGroup().addComponent(label)
    .addGroup(layout.createParallelGroup(Alignment.LEADING).addComponent(textField)
        .addGroup(layout.createSequentialGroup()
            .addGroup(layout.createParallelGroup(Alignment.LEADING).addComponent(mcase)
                .addComponent(wholew).addComponent(wrap))
        .addGroup(layout.createParallelGroup(Alignment.LEADING).addComponent(regex)
            .addComponent(reverse))))
    .addGroup(layout.createParallelGroup(Alignment.LEADING).addComponent(findButton)));
layout.setVerticalGroup(layout.createSequentialGroup()
    .addGroup(layout.createParallelGroup(Alignment.BASELINE).addComponent(label).addComponent(textField)
        .addComponent(findButton))
    .addGroup(layout.createParallelGroup(Alignment.LEADING)
        .addGroup(layout.createSequentialGroup()
            .addGroup(layout.createParallelGroup(Alignment.BASELINE).addComponent(mcase)
                .addComponent(regex))

代码示例来源:origin: stackoverflow.com

GroupLayout layout = new GroupLayout(this);          
this.setLayout(layout);
layout.setAutoCreateGaps(true);
layout.setAutoCreateContainerGaps(true);
layout.setHorizontalGroup(layout.createSequentialGroup()
  .addGroup(layout.createParallelGroup(GroupLayout.Alignment.TRAILING)
    .addComponent(label1)
    .addComponent(label2)
    .addComponent(label3))
  .addGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING)
    .addComponent(field1)
    .addComponent(field2)
    .addComponent(field3))
);
layout.setVerticalGroup(layout.createSequentialGroup()
  .addGroup(layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
    .addComponent(label1)
    .addComponent(field1))

代码示例来源:origin: kiegroup/optaplanner

private JComponent createToolBar() {
  GroupLayout toolBarLayout = new GroupLayout(toolBar);
  toolBar.setLayout(toolBarLayout);
  solveButton.setPreferredSize(terminateSolvingEarlyButton.getPreferredSize());
  GroupLayout.SequentialGroup horizontalGroup = toolBarLayout.createSequentialGroup();
  if (solutionBusiness.hasImporter()) {
    horizontalGroup.addComponent(importButton);
  horizontalGroup.addComponent(openButton);
  horizontalGroup.addComponent(saveButton);
  if (solutionBusiness.hasExporter()) {
    horizontalGroup.addComponent(exportButton);
  horizontalGroup.addComponent(solvePanel, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE);
  horizontalGroup.addComponent(progressBar, 20, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE);
  toolBarLayout.setHorizontalGroup(horizontalGroup);
  GroupLayout.ParallelGroup verticalGroup = toolBarLayout.createParallelGroup(GroupLayout.Alignment.CENTER);
  if (solutionBusiness.hasImporter()) {
    verticalGroup.addComponent(importButton);
  toolBarLayout.setVerticalGroup(verticalGroup);
  return toolBar;

代码示例来源:origin: magefree/mage

lblPlayerNum.setText("Player #");
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
this.setLayout(layout);
layout.setHorizontalGroup(
    layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
        .addGroup(layout.createSequentialGroup()
            .addContainerGap()
            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addComponent(lblPlayerNum)
                .addGroup(layout.createSequentialGroup()
                    .addComponent(lbPlayerType)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(cbPlayerType, javax.swing.GroupLayout.PREFERRED_SIZE, 166, javax.swing.GroupLayout.PREFERRED_SIZE)))
            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
            .addComponent(newPlayerPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 318, Short.MAX_VALUE))
);
layout.setVerticalGroup(
    layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
        .addGroup(layout.createSequentialGroup()
            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(layout.createSequentialGroup()
                    .addComponent(lblPlayerNum)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)

代码示例来源:origin: magefree/mage

btnYes.addActionListener(evt -> btnYesActionPerformed(evt));
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
  layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
    .addContainerGap()
    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
      .addComponent(lblQuestion, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 207, Short.MAX_VALUE)
      .addGroup(layout.createSequentialGroup()
        .addComponent(btnYes)
        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
        .addComponent(btnNo)))
    .addContainerGap())
);
layout.setVerticalGroup(
  layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
    .addContainerGap()
    .addComponent(lblQuestion, javax.swing.GroupLayout.DEFAULT_SIZE, 35, Short.MAX_VALUE)
    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)

代码示例来源:origin: magefree/mage

lblDefender.setText("Defender");
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
this.setLayout(layout);
layout.setHorizontalGroup(
  layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  .addComponent(lblDefender, javax.swing.GroupLayout.DEFAULT_SIZE, 69, Short.MAX_VALUE)
  .addComponent(blockers, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
  .addComponent(attackers, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
);
layout.setVerticalGroup(
  layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  .addGroup(layout.createSequentialGroup()
    .addComponent(lblDefender)
    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
    .addComponent(blockers, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
    .addGap(0, 0, 0)
    .addComponent(attackers, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
);

代码示例来源:origin: magefree/mage

javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
this.setLayout(layout);
layout.setHorizontalGroup(
  layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  .addGroup(layout.createSequentialGroup()
    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
      .addGroup(layout.createSequentialGroup()
        .addGap(4, 4, 4)
        .addComponent(lblPlayerDeck))
      .addComponent(lblPlayerName))
    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
      .addComponent(txtPlayerName, javax.swing.GroupLayout.DEFAULT_SIZE, 310, Short.MAX_VALUE)
      .addComponent(txtPlayerDeck, javax.swing.GroupLayout.DEFAULT_SIZE, 310, Short.MAX_VALUE))
    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
      .addGroup(layout.createSequentialGroup()
        .addComponent(btnPlayerDeck, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE)
        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
        .addComponent(btnGenerate, javax.swing.GroupLayout.PREFERRED_SIZE, 87, javax.swing.GroupLayout.PREFERRED_SIZE))
      .addGroup(layout.createSequentialGroup()
        .addComponent(lblLevel)
        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        .addGap(64, 64, 64))))
);
layout.setVerticalGroup(
  layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  .addGroup(layout.createSequentialGroup()

代码示例来源:origin: magefree/mage

jScrollPane2.setViewportView(jTextArea1);
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
  layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  .addGroup(layout.createSequentialGroup()
    .addContainerGap()
    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
      .addGroup(layout.createSequentialGroup()
        .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 647, Short.MAX_VALUE)
        .addContainerGap())
      .addGroup(layout.createSequentialGroup()
        .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 647, Short.MAX_VALUE)
        .addContainerGap())
      .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
        .addComponent(btnOK, javax.swing.GroupLayout.PREFERRED_SIZE, 60, javax.swing.GroupLayout.PREFERRED_SIZE)
        .addContainerGap())))
);
layout.setVerticalGroup(
  layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  .addGroup(layout.createSequentialGroup()
    .addGap(6, 6, 6)
    .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 43, Short.MAX_VALUE)

代码示例来源:origin: magefree/mage

private void initComponents() {
  setBorder(BorderFactory.createLineBorder(new Color(0, 0, 0, 0)));
  playerPanel = new PlayerPanelExt();
  btnCheat = new javax.swing.JButton();
  battlefieldPanel = new mage.client.game.BattlefieldPanel();
  battlefieldPanel.setTopPanelBattlefield(options.topRow);
  btnCheat.setText("Cheat");
  btnCheat.addActionListener(evt -> btnCheatActionPerformed(evt));
  javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
  layout.setHorizontalGroup(
      layout.createSequentialGroup()
      .addComponent(playerPanel, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
      .addPreferredGap(ComponentPlacement.RELATED)
      .addComponent(battlefieldPanel, 0, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
  );
  layout.setVerticalGroup(
      layout.createParallelGroup(Alignment.LEADING)
      .addComponent(playerPanel, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
      .addComponent(battlefieldPanel, GroupLayout.DEFAULT_SIZE, 160, Short.MAX_VALUE)
  );
  this.setLayout(layout);
}

代码示例来源:origin: magefree/mage

/**
 * This method is called from within the constructor to initialize the form.
 * WARNING: Do NOT modify this code. The content of this method is always
 * regenerated by the Form Editor.
 */
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
  cards = new mage.client.cards.Cards();
  setIconifiable(true);
  setResizable(true);
  setPreferredSize(new Dimension((int) Math.round(GUISizeHelper.otherZonesCardDimension.width * 1.3),
      (int) Math.round(GUISizeHelper.otherZonesCardDimension.height * 1.2)));
  javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
  getContentPane().setLayout(layout);
  layout.setHorizontalGroup(
      layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
          .addGroup(layout.createSequentialGroup()
              .addComponent(cards, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
              .addGap(0, 0, 0))
  );
  layout.setVerticalGroup(
      layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
          .addGroup(layout.createSequentialGroup()
              .addComponent(cards, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
              .addGap(0, 0, 0))
  );
  pack();
}// </editor-fold>//GEN-END:initComponents

代码示例来源:origin: magefree/mage

jLabel4.setText("fireshoes, lunaskyrise, mnapoleon, jgod, LoneFox, drmDev, spjspj, TheElk801, L_J, JayDi85.");
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
  layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
    .addContainerGap()
    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
      .addComponent(jLabel3, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
      .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
        .addComponent(jLabel1)
        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
        .addComponent(lblVersion))
      .addComponent(jLabel2, javax.swing.GroupLayout.Alignment.LEADING)
      .addComponent(btnOk)
    .addContainerGap())
);
layout.setVerticalGroup(
  layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
    .addContainerGap()
    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)

代码示例来源:origin: magefree/mage

javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
  layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  .addGroup(layout.createSequentialGroup()
    .addContainerGap()
    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
      .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
        .addGap(0, 0, Short.MAX_VALUE)
        .addComponent(btnOK)
        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
        .addComponent(btnCancel))
      .addComponent(newPlayerPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 414, Short.MAX_VALUE)
      .addGroup(layout.createSequentialGroup()
        .addComponent(lblPassword)
        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
        .addComponent(txtPassword, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)
    .addContainerGap())
);
layout.setVerticalGroup(
  layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
    .addContainerGap()
    .addComponent(newPlayerPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

代码示例来源:origin: magefree/mage

javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
this.setLayout(layout);
layout.setHorizontalGroup(
  layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  .addGroup(layout.createSequentialGroup()
    .addContainerGap()
    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
      .addGroup(layout.createSequentialGroup()
        .addComponent(lblGreen)
        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 18, Short.MAX_VALUE)
        .addComponent(btnGreen, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE))
      .addGroup(layout.createSequentialGroup()
        .addComponent(lblColorless)
      .addGroup(layout.createSequentialGroup()
      .addGroup(layout.createSequentialGroup()
      .addGroup(layout.createSequentialGroup()
        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
          .addComponent(lblBlack)
          .addComponent(lblBlue))
    .addContainerGap())
);
layout.setVerticalGroup(
  layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  .addGroup(layout.createSequentialGroup()

代码示例来源:origin: org.netbeans.api/org-openide-dialogs

GroupLayout layout = new GroupLayout(panel);
panel.setLayout(layout);
if (longText) {
  layout.setHorizontalGroup(
    layout.createParallelGroup(Alignment.LEADING)
    .addGroup(layout.createSequentialGroup()
      .addContainerGap()
      .addGroup(layout.createParallelGroup(Alignment.LEADING)
        .addGroup(layout.createSequentialGroup()
          .addComponent(textLabel, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
          .addGap(32, 32, 32))
        .addComponent(textField))
      .addContainerGap())
  );
} else {
  layout.setHorizontalGroup(
    layout.createParallelGroup(Alignment.LEADING)
    .addGroup(layout.createSequentialGroup()
      .addContainerGap()
      .addComponent(textLabel)
  layout.setVerticalGroup(
    layout.createParallelGroup(Alignment.LEADING)
    .addGroup(layout.createSequentialGroup()
  );
} else {
  layout.setVerticalGroup(
        layout.createParallelGroup(Alignment.LEADING)

相关文章