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

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

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

JTextField.getBackground介绍

暂无

代码示例

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

if (direction == 0 && !COLOR_BG_ERROR.equals(searchField.getBackground())) {
  try {
    int caretPos = rTextArea.getCaretPosition();

代码示例来源:origin: JetBrains/ideavim

setBackground(myEntry.getBackground());
myLabel.setBackground(myEntry.getBackground());

代码示例来源:origin: Nilhcem/FakeSMTP

Color bg = saveMsgField.getBackground();
saveMsgField.setEditable(false);
saveMsgField.setBackground(bg);

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

public IntegerInputVerifier() {
 JTextField tf = new JTextField();
 jTextFieldDefaultColor = tf.getBackground();
}

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

public DoubleInputVerifier() {
 JTextField tf = new JTextField();
 jTextFieldDefaultColor = tf.getBackground();
}

代码示例来源:origin: otros-systems/otroslogviewer

public SearchModeValidatorDocumentListener(JTextField textField,
                      StatusObserver observer,
                      SearchMode searchMode,
                      Theme theme) {
 super();
 this.textField = textField;
 normalColor = textField.getBackground();
 errorColor = theme.getColor(ThemeKey.TEXT_FIELD_ERROR);
 editingColor = OtrosSwingUtils.isLight(normalColor) ? normalColor.darker() : normalColor.brighter();
 statusObserver = observer;
 this.searchMode = searchMode;
}

代码示例来源:origin: google/sagetv

private void checkSolid()
 {
  if (nameField.getBackground() != java.awt.Color.white)
  {
   nameField.setBackground(java.awt.Color.white);
   nameField.repaint();
  }
 }
});

代码示例来源:origin: google/sagetv

private void checkSolid()
 {
  if (nameField.getBackground() != java.awt.Color.white)
  {
   nameField.setBackground(java.awt.Color.white);
   nameField.repaint();
  }
 }
});

代码示例来源:origin: google/sagetv

private void checkSolid()
 {
  if (colorHexField.getBackground() != java.awt.Color.white)
  {
   colorHexField.setBackground(java.awt.Color.white);
   colorHexField.repaint();
  }
 }
});

代码示例来源:origin: google/sagetv

private void checkSolid()
 {
  if (fontSizeField.getBackground() != java.awt.Color.white)
  {
   fontSizeField.setBackground(java.awt.Color.white);
   fontSizeField.repaint();
  }
 }
});

代码示例来源:origin: google/sagetv

private void checkSolid()
 {
  if (valField.getBackground() != java.awt.Color.white)
  {
   valField.setBackground(java.awt.Color.white);
   valField.repaint();
  }
 }
});

代码示例来源:origin: google/sagetv

private void checkSolid()
 {
  if (valField.getBackground() != java.awt.Color.white)
  {
   valField.setBackground(java.awt.Color.white);
   valField.repaint();
  }
 }
});

代码示例来源:origin: google/sagetv

private void checkSolid()
 {
  if (fileField.getBackground() != java.awt.Color.white)
  {
   fileField.setBackground(java.awt.Color.white);
   fileField.repaint();
  }
 }
});

代码示例来源:origin: com.eas.platypus/platypus-js-forms

@ScriptFunction(jsDoc = CONSTRUCTOR_JSDOC)
public ModelSpin() {
  super();
  setDecorated(new VSpinner());
  setBackground((new JTextField()).getBackground());
}

代码示例来源:origin: org.swinglabs.swingx/swingx-core

@Override
public void addNotify() {
  super.addNotify();
  if (previousBackgroundColor == null) {
    previousBackgroundColor = searchField.getBackground();
    previousForegroundColor = searchField.getForeground();
  } else {
    searchField.setBackground(previousBackgroundColor);
    searchField.setForeground(previousForegroundColor);
  }
}

代码示例来源:origin: org.bidib.jbidib.swinglabs.swingx/swingx-core

@Override
public void addNotify() {
  super.addNotify();
  if (previousBackgroundColor == null) {
    previousBackgroundColor = searchField.getBackground();
    previousForegroundColor = searchField.getForeground();
  } else {
    searchField.setBackground(previousBackgroundColor);
    searchField.setForeground(previousForegroundColor);
  }
}

代码示例来源:origin: com.haulmont.thirdparty/swingx-core

@Override
public void addNotify() {
  super.addNotify();
  if (previousBackgroundColor == null) {
    previousBackgroundColor = searchField.getBackground();
    previousForegroundColor = searchField.getForeground();
  } else {
    searchField.setBackground(previousBackgroundColor);
    searchField.setForeground(previousForegroundColor);
  }
}

代码示例来源:origin: org.codehaus.jtstand/jtstand-desktop

@Override
public void addNotify() {
  super.addNotify();
  if (previousBackgroundColor == null) {
    previousBackgroundColor = searchField.getBackground();
    previousForegroundColor = searchField.getForeground();
  } else {
    searchField.setBackground(previousBackgroundColor);
    searchField.setForeground(previousForegroundColor);
  }
}

代码示例来源:origin: org.swinglabs.swingx/swingx-all

@Override
public void addNotify() {
  super.addNotify();
  if (previousBackgroundColor == null) {
    previousBackgroundColor = searchField.getBackground();
    previousForegroundColor = searchField.getForeground();
  } else {
    searchField.setBackground(previousBackgroundColor);
    searchField.setForeground(previousForegroundColor);
  }
}

代码示例来源:origin: org.gdl-lang.gdl-tools/openehr-utils-gui-swing

private void init() {
  this.setLayout(new BorderLayout());
  this.add(getJTextField());
  this.add(getJButton(), BorderLayout.EAST);
  Border textBorder = getJTextField().getBorder();
  getJTextField().setBorder(null);
  this.setBackground(getJTextField().getBackground());
  this.setBorder(textBorder);
}

相关文章

JTextField类方法