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

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

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

JTextField.setBounds介绍

暂无

代码示例

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

stock_field.setBounds(new Rectangle(100, 30, 100, 30));
value_field.setBounds(new Rectangle(100, 60, 100, 30));
listbox.setBounds(new Rectangle(210, 30, 150, 160));
err_msg.setBounds(new Rectangle(10, 200, 350, 30));

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

public void componentResized(ComponentEvent e) {
  numberField.setBounds(draggerLeftWidth, 1, getWidth() - draggerLeftWidth - draggerRightWidth, draggerHeight - 2);
}

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

scroll.setBounds(0, 200, 900, 150);
searchField.setBounds(10, 100, 150, 20);
searchField.addActionListener(new ActionListener() {

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

hexField.setBackground(null);
hexPanel.add(hexField);
hexField.setBounds(0, 10, 110, 22);
hexField.addActionListener(new ActionListener() {
  public void actionPerformed(ActionEvent e) {

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

@Override
public void setBounds(int x, int y, int w, int h) {
  int newX = Math.max(x, offset);
  super.setBounds(newX, y, w - (newX - x), h);
}

代码示例来源:origin: uk.org.mygrid.taverna/taverna-core

public void setBounds(int x, int y, int w, int h) {
  int newX = Math.max(x, offset);
  super.setBounds(newX, y, w - (newX - x), h);
}
}

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

for (TrainingClass tclass : mTrainingClasses) {
    //Loop the ArrayList
    JTextField txtPriority = new JTextField(3);
    txtPriority.setBounds(10,10,100,20);
    txtPriority.setText("" + tclass.getPriority());
    getContentPane().add(txtPriority);
    textFields.add(txtPriority);
}

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

Map<JTextField, TrainingClass> fieldMap = new HashMap<>();
for (TrainingClass tclass : mTrainingClasses) {
  //Loop the ArrayList
  JTextField txtPriority = new JTextField(3);
  txtPriority.setBounds(10,10,100,20);
  txtPriority.setText("" + tclass.getPriority());
  getContentPane().add(txtPriority);
  map.put(txtPriority, tclass);
}

代码示例来源:origin: org.mobicents.protocols.ss7.tools.simulator/simulator-gui

private JTextField cretateTextField(JPanel section,String name, int y_pos) {
  JLabel label = new JLabel(name);
  label.setBounds(10, y_pos, 174, 14);
  section.add(label);
  JTextField textField = new JTextField();
  textField.setBounds(194, y_pos, 307, 20);
  textField.setColumns(10);
  section.add(textField);
  return textField;
}

代码示例来源:origin: org.restcomm.protocols.ss7.tools.simulator/simulator-gui

private JTextField cretateTextField(JPanel section,String name, int y_pos) {
  JLabel label = new JLabel(name);
  label.setBounds(10, y_pos, 174, 14);
  section.add(label);
  JTextField textField = new JTextField();
  textField.setBounds(194, y_pos, 307, 20);
  textField.setColumns(10);
  section.add(textField);
  return textField;
}

代码示例来源:origin: org.mobicents.protocols.ss7.tools.simulator/simulator-gui

private JTextField cretateTextField(JPanel section,String name, int y_pos) {
  JLabel label = new JLabel(name);
  label.setBounds(10, y_pos, 174, 14);
  section.add(label);
  JTextField textField = new JTextField();
  textField.setBounds(194, y_pos, 307, 20);
  textField.setColumns(10);
  section.add(textField);
  return textField;
}

代码示例来源:origin: lingfengsan/MillionHero

/**
 * 创建文本域用于用户输入APP_ID
 */
private static void addAppId() {
  JLabel adbPathLabel = new JLabel("APP_ID:");
  adbPathLabel.setBounds(10, 20, 120, 25);
  dialogPane.add(adbPathLabel);
  appIdText = new JTextField(Config.getAppId(), 50);
  appIdText.setBounds(130, 20, 250, 25);
  dialogPane.add(appIdText);
}
/**

代码示例来源:origin: lingfengsan/MillionHero

/**
 * 创建文本域用于用户输入API_KEY
 */
private static void addApiKey() {
  JLabel label = new JLabel("API_KEY:");
  label.setBounds(10, 50, 120, 25);
  dialogPane.add(label);
  apiKeyText = new JTextField(Config.getApiKey(), 50);
  apiKeyText.setBounds(130, 50, 250, 25);
  dialogPane.add(apiKeyText);
}

代码示例来源:origin: lingfengsan/MillionHero

/**
 * 创建文本域用于用户输入SECRET_KEY
 */
private static void addSecretKey() {
  JLabel label = new JLabel("SECRET_KEY:");
  label.setBounds(10, 80, 120, 25);
  dialogPane.add(label);
  secretKeyText = new JTextField(Config.getSecretKey(), 50);
  secretKeyText.setBounds(130, 80, 250, 25);
  dialogPane.add(secretKeyText);
}

代码示例来源:origin: lingfengsan/MillionHero

/**
 *
 * @param panel 创建图片存放路径
 */
private static void addImagePath(JPanel panel) {
  JLabel imagePathLabel = new JLabel("图片存放路径:");
  imagePathLabel.setBounds(10, 45, 100, 25);
  panel.add(imagePathLabel);
  imagePathText = new JTextField(Config.getPhotoPath(), 30);
  imagePathText.setBounds(100, 45, 100, 25);
  panel.add(imagePathText);
}

代码示例来源:origin: lingfengsan/MillionHero

/**
 * 创建文本域用于用户输入APP_ID
 */
private static void addAppId() {
  JLabel adbPathLabel = new JLabel("APP_ID:");
  adbPathLabel.setBounds(10, 20, 120, 25);
  dialogPane.add(adbPathLabel);
  appIdText = new JTextField(Config.getNlpAppId(), 50);
  appIdText.setBounds(130, 20, 250, 25);
  dialogPane.add(appIdText);
}

代码示例来源:origin: lingfengsan/MillionHero

/**
 * 创建文本域用于用户输入SECRET_KEY
 */
private static void addSecretKey() {
  JLabel label = new JLabel("SECRET_KEY:");
  label.setBounds(10, 80, 120, 25);
  dialogPane.add(label);
  secretKeyText = new JTextField(Config.getNlpSecretKey(), 50);
  secretKeyText.setBounds(130, 80, 250, 25);
  dialogPane.add(secretKeyText);
}

代码示例来源:origin: lingfengsan/MillionHero

/**
 *
 * @param panel 创建文本域用于用户输入adb路径
 */
private static void addAdbPath(JPanel panel) {
  JLabel adbPathLabel = new JLabel("adb路径:");
  adbPathLabel.setBounds(10, 20, 100, 25);
  panel.add(adbPathLabel);
  adbPathText = new JTextField(Config.getAdbPath(), 30);
  adbPathText.setBounds(100, 20, 100, 25);
  panel.add(adbPathText);
}

代码示例来源:origin: lingfengsan/MillionHero

/**
 * 创建文本域用于用户输入API_KEY
 */
private static void addApiKey() {
  JLabel label = new JLabel("API_KEY:");
  label.setBounds(10, 50, 120, 25);
  dialogPane.add(label);
  apiKeyText = new JTextField(Config.getNlpApiKey(), 50);
  apiKeyText.setBounds(130, 50, 250, 25);
  dialogPane.add(apiKeyText);
}

代码示例来源:origin: de.tudarmstadt.ukp.wikipedia/de.tudarmstadt.ukp.wikipedia.revisionmachine

/**
 * Creates the start input components.
 */
private void createStartLabel()
{
  startLabel = new JLabel("Ignore all bytes before:");
  startLabel.setBounds(10, 120, 130, 25);
  this.add(startLabel);
  startPosition = new JTextField();
  startPosition.setBounds(150, 120, 110, 25);
  this.add(startPosition);
}

相关文章

JTextField类方法