javax.swing.JTextField.setAlignmentX()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(6.9k)|赞(0)|评价(0)|浏览(204)

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

JTextField.setAlignmentX介绍

暂无

代码示例

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

textField.setAlignmentX(0.0f);
textPanel.add(textField);

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

textField.setAlignmentX(0.0f);
textPanel.add(textField);

代码示例来源:origin: skylot/jadx

private void initUI() {
  JLabel findLabel = new JLabel(NLS.str("search_dialog.open_by_name"));
  searchField = new JTextField();
  searchField.setAlignmentX(LEFT_ALIGNMENT);
  new TextStandardActions(searchField);
  searchFieldSubscribe();

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

textField.setAlignmentX(0.0f);
textPanel.add(textField);

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

textField.setAlignmentX(0.0f);
textPanel.add(textField);

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

JTextField textField = new JTextField(10);
textField.setMaximumSize(textField.getPreferredSize());
textField.setAlignmentX(Component.LEFT_ALIGNMENT); // If needed

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

ipTextfield.setAlignmentX(Component.LEFT_ALIGNMENT);
ipTextfield.setFocusable(false);
ipTextfield.setEditable(false);

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-visualweb-propertyeditors

HTTPPanel() {
    this.setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
    httpLabel.setText(bundle.getString("enterUrlHttp")); //NOI18N
    httpLabel.setAlignmentX(JLabel.LEFT_ALIGNMENT);
    this.add(httpLabel);
    textField.setMaximumSize(new Dimension(Integer.MAX_VALUE,
     textField.getPreferredSize().height));
    textField.setAlignmentX(JTextField.LEFT_ALIGNMENT);
    textField.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(StandardUrlPanel.class, "URL_TEXTFIELD_ACCESS_NAME"));
    textField.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(StandardUrlPanel.class, "URL_TEXTFIELD_ACCESS_DESC"));
    this.add(textField);
  }
}

代码示例来源:origin: com.tourgeek.thin.app/com.tourgeek.thin.app.booking

/**
 * Build a text edit field.
 */
public JComponent buildTextEdit(BaseApplet applet, RemoteSession remoteSession, String strDesc, String strName)
{
  JTextField text = new JDescTextField(10, strDesc, this);
  text.setMaximumSize(new Dimension(200, 20));    // HACK
  String strValue = (String)this.getMainProperty(strName);
  if (strValue != null)
    text.setText(strValue);
  text.setName(strName);
  text.setAlignmentX(LEFT_ALIGNMENT);
  return text;
}
/**

代码示例来源:origin: robo-code/robocode

compilerPreferencesContentPane.add(label);
getCompilerBinaryField().setAlignmentX(Component.LEFT_ALIGNMENT);
compilerPreferencesContentPane.add(getCompilerBinaryField());
label.setAlignmentX(Component.LEFT_ALIGNMENT);
compilerPreferencesContentPane.add(label);
getCompilerOptionsField().setAlignmentX(Component.LEFT_ALIGNMENT);
compilerPreferencesContentPane.add(getCompilerOptionsField());
label = new JLabel(" ");
label.setAlignmentX(Component.LEFT_ALIGNMENT);
compilerPreferencesContentPane.add(label);
getCompilerClasspathField().setAlignmentX(Component.LEFT_ALIGNMENT);
compilerPreferencesContentPane.add(getCompilerClasspathField());
JPanel panel = new JPanel();

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-visualweb-propertyeditors

HTTPPanel() {
    this.setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
    httpLabel.setText(bundle.getMessage("enterUrlHttp")); //NOI18N
    httpLabel.setAlignmentX(JLabel.LEFT_ALIGNMENT);
    this.add(httpLabel);
   //   textField.setMaximumSize(new Dimension(Integer.MAX_VALUE,
    //     textField.getPreferredSize().height));
    textField.setAlignmentX(JTextField.LEFT_ALIGNMENT);
    textField.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(URLPanel.class, "URL_TEXTFIELD_ACCESS_NAME"));
    textField.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(URLPanel.class, "URL_TEXTFIELD_ACCESS_DESC"));
    this.add(textField);
  }
}

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

base_uri.setText(currentModel.getMutablePrefixManager().getDefaultPrefix()
    .replace("#", "/"));
base_uri.setAlignmentX(Component.LEFT_ALIGNMENT);
panel.add(base_uri);
Dimension minsize2 = new Dimension(20, 20);

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-profiler

textField.setPreferredSize(new Dimension(350, textField.getPreferredSize().height));
textField.requestFocus();            
textField.setAlignmentX(Component.LEFT_ALIGNMENT);

代码示例来源:origin: chungkwong/MathOCR

public LogicalInspector(){
  del=addButton("DELETE");
  modify=addButton("MODIFY");
  bar.addSeparator();
  type.setAlignmentX(0);
  bar.add(type);
  area.setAlignmentX(0);
  area.setLineWrap(true);
  bar.add(area);
  noStart.setAlignmentX(0);
  bar.add(noStart);
  noEnd.setAlignmentX(0);
  bar.add(noEnd);
  additional.setAlignmentX(0);
  JLabel lab=new JLabel(ENVIRONMENT.getTranslation("ADDITIONAL_INFO"));
  lab.setAlignmentX(0);
  bar.add(lab);
  additional.setAlignmentX(0);
  bar.add(additional);
  bar.addSeparator();
  next=addButton("NEXT");
  add(new JScrollPane(bar),BorderLayout.EAST);
}
private final JButton addButton(String com){

代码示例来源:origin: com.badlogicgames.gdx/gdx-backend-jglfw

textField.setAlignmentX(0.0f);
textPanel.add(textField);

代码示例来源:origin: protegeproject/protege

bg.add(userInputButton);
uriField = new JTextField();
uriField.setAlignmentX(LEFT_ALIGNMENT);
uriField.setEnabled(false);
userInputButton.addActionListener(e -> {

代码示例来源:origin: cytoscape.coreplugins/cpath2

searchButton = createSearchButton(searchField);
searchField.setAlignmentX(Component.LEFT_ALIGNMENT);

代码示例来源:origin: org.cytoscape/cpath2-impl

searchButton = createSearchButton(searchField);
searchField.setAlignmentX(Component.LEFT_ALIGNMENT);

代码示例来源:origin: robo-code/robocode

teamNamePanel.setLayout(new FlowLayout(FlowLayout.LEFT, 0, 0));
teamNamePanel.setAlignmentX(Component.LEFT_ALIGNMENT);
getTeamNameField().setAlignmentX(Component.LEFT_ALIGNMENT);
getTeamNameField().setMaximumSize(getTeamNameField().getPreferredSize());
versionPanel.setLayout(new FlowLayout(FlowLayout.LEFT, 0, 0));
versionPanel.setAlignmentX(Component.LEFT_ALIGNMENT);
getVersionField().setAlignmentX(Component.LEFT_ALIGNMENT);
getVersionField().setMaximumSize(getVersionField().getPreferredSize());
versionPanel.setMaximumSize(new Dimension(Integer.MAX_VALUE, getVersionField().getPreferredSize().height));
getAuthorField().setAlignmentX(Component.LEFT_ALIGNMENT);
getAuthorField().setMaximumSize(getAuthorField().getPreferredSize());
add(getAuthorField());
getWebpageField().setAlignmentX(Component.LEFT_ALIGNMENT);
getWebpageField().setMaximumSize(getWebpageField().getPreferredSize());
add(getWebpageField());

代码示例来源:origin: triplea-game/triplea

attackerUnits.setAlignmentX(Component.CENTER_ALIGNMENT);
add(attackerUnits);
attackerTextField.setAlignmentX(Component.CENTER_ALIGNMENT);
add(attackerTextField);
add(Box.createVerticalStrut(30));
defenderUnits.setAlignmentX(Component.CENTER_ALIGNMENT);
add(defenderUnits);
defenderTextField.setAlignmentX(Component.CENTER_ALIGNMENT);
add(defenderTextField);
add(Box.createVerticalStrut(10));

相关文章

JTextField类方法