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

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

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

JTextField.getX介绍

暂无

代码示例

代码示例来源:origin: joel-costigliola/assertj-swing

@RunsInCurrentThread
static @Nonnull Pair<Point, Container> pointAndParentForScrolling(final @Nonnull JTextField textField) {
 Point origin = new Point(textField.getX(), textField.getY());
 Container parent = textField.getParent();
 while (parent != null && !(parent instanceof JComponent) && !(parent instanceof CellRendererPane)) {
  origin = addRectangleToPoint(checkNotNull(parent.getBounds()), origin);
  parent = parent.getParent();
 }
 return Pair.of(origin, parent);
}

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

lblTest2.setBounds(txtTest1.getX() + txtTest1.getWidth() + 8, insets.top + 5, lblTest2.getPreferredSize().width, lblTest2.getPreferredSize().height);
txtTest2.setBounds(lblTest2.getX() + lblTest2.getWidth() + 8, insets.top + 5, txtTest2.getPreferredSize().width, txtTest2.getPreferredSize().height);
lblTest3.setBounds(txtTest2.getX() + txtTest2.getWidth() + 5, insets.top + 5, lblTest3.getPreferredSize().width, lblTest3.getPreferredSize().height);
txtTest3.setBounds(lblTest3.getX() + lblTest3.getWidth() + 5, insets.top + 5, txtTest3.getPreferredSize().width, txtTest3.getPreferredSize().height);
lblTest4.setBounds(txtTest3.getX() + txtTest3.getWidth() + 5, insets.top + 5, lblTest4.getPreferredSize().width, lblTest4.getPreferredSize().height);
txtTest4.setBounds(lblTest4.getX() + lblTest4.getWidth() + 5, insets.top + 5, txtTest4.getPreferredSize().width, txtTest4.getPreferredSize().height);
btnCalculate.setBounds(txtTest4.getX() + txtTest4.getWidth() + 5, insets.top + 5, btnCalculate.getPreferredSize().width, btnCalculate.getPreferredSize().height);
lblWeight1.setBounds(insets.left + 5, insets.top + 30, lblWeight1.getPreferredSize().width, lblWeight1.getPreferredSize().height);
txtWeight1.setBounds(lblWeight1.getX() + lblWeight1.getWidth() + 5, insets.top + 30, txtWeight1.getPreferredSize().width, txtWeight1.getPreferredSize().height);
lblWeight2.setBounds(txtWeight1.getX() + txtWeight1.getWidth() + 5, insets.top + 30, txtWeight1.getPreferredSize().width, txtWeight1.getPreferredSize().height);
txtWeight2.setBounds(lblWeight2.getX() + lblWeight2.getWidth() + 10, insets.top + 30, txtWeight2.getPreferredSize().width, txtWeight2.getPreferredSize().height);
lblWeight3.setBounds(txtWeight2.getX() + txtWeight2.getWidth() + 10, insets.top + 30, txtWeight2.getPreferredSize().width, txtWeight2.getPreferredSize().height);
txtWeight3.setBounds(lblWeight3.getX() + lblWeight3.getWidth() + 10, insets.top + 30, txtWeight3.getPreferredSize().width, txtWeight3.getPreferredSize().height);
lblWeight4.setBounds(txtWeight3.getX() + txtWeight3.getWidth() + 15, insets.top + 30, txtWeight4.getPreferredSize().width, txtWeight3.getPreferredSize().height);
txtWeight4.setBounds(lblWeight4.getX() + lblWeight4.getWidth() + 15, insets.top + 30, txtWeight4.getPreferredSize().width, txtWeight4.getPreferredSize().height);

代码示例来源:origin: robward-scisys/sldeditor

textField.getX() + textField.getWidth() + 5,
y,
BasePanel.WIDGET_BUTTON_WIDTH,

代码示例来源:origin: robward-scisys/sldeditor

int padding = 3;
buttonExternal.setBounds(
    xPos + textField.getX() - buttonWidth - padding,
    0,
    buttonWidth,

代码示例来源:origin: robward-scisys/sldeditor

int padding = 3;
buttonExternal.setBounds(
    xPos + textField.getX() - buttonWidth - padding,
    0,
    buttonWidth,

相关文章

JTextField类方法