本文整理了Java中javax.swing.text.JTextComponent.setDisabledTextColor()
方法的一些代码示例,展示了JTextComponent.setDisabledTextColor()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JTextComponent.setDisabledTextColor()
方法的具体详情如下:
包路径:javax.swing.text.JTextComponent
类名称:JTextComponent
方法名:setDisabledTextColor
暂无
代码示例来源:origin: stackoverflow.com
someComboBox.getEditor().selectAll();
someComboBox.getEditor().getEditorComponent().setBackground(Color.YELLOW);
((JTextField) someComboBox.getEditor().getEditorComponent()).setDisabledTextColor(Color.black);
someComboBox.setName("someComboBox");
someComboBox.setDataList(listSomeAnotherString);
代码示例来源:origin: bobbylight/RSyntaxTextArea
editor.setDisabledTextColor(c);
代码示例来源:origin: stackoverflow.com
import java.awt.Color;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JTextField;
import javax.swing.UIManager;
public class TestDisabledTextField {
public static void main(String[] args) {
UIManager.put("TextField.disabledBackground", Color.YELLOW);
JTextField textField = new JTextField("Disabled text field", 15);
textField.setEnabled(false);
textField.setDisabledTextColor(Color.RED);
JPanel panel = new JPanel();
panel.add(textField);
JOptionPane.showMessageDialog(null, panel);
}
}
代码示例来源:origin: stackoverflow.com
JTextArea textArea = new JTextArea(100, 20);
textArea.setEnabled(false);
textArea.setDisabledTextColor(Color.BLACK);
textArea.setText(receiptText);
JButton closeButton = new JButton("Close");
代码示例来源:origin: stackoverflow.com
someComboBox.getEditor().selectAll();
someComboBox.getEditor().getEditorComponent().setBackground(Color.YELLOW);
((JTextField) someComboBox.getEditor().getEditorComponent()).setDisabledTextColor(Color.black);
someComboBox.setName("someComboBox");
someComboBox.setDataList(listSomeAnotherString);
代码示例来源:origin: stackoverflow.com
disabled.setBackground(bgColor);
Color fgColor = UIManager.getColor("TextField.foreground");
disabled.setDisabledTextColor(fgColor);
disabled.setBorder(BorderFactory.createEtchedBorder());
代码示例来源:origin: stackoverflow.com
s1.setForeground(Color.yellow);
s1.setBackground(Color.blue);
s1.setDisabledTextColor(Color.yellow);
s2.setForeground(Color.yellow);
s2.setBackground(Color.blue);
s2.setDisabledTextColor(Color.yellow);
代码示例来源:origin: stackoverflow.com
pane.setDisabledTextColor(Color.red);
pane.setForeground(Color.red);
JFrame f = new JFrame("Frame");
代码示例来源:origin: stackoverflow.com
lines.setFont(fixedFont);
lines.setBackground(Color.LIGHT_GRAY);
lines.setDisabledTextColor(Color.BLACK);
代码示例来源:origin: stackoverflow.com
JPanel panel = new JPanel(new GridLayout(0, 4));
field1TF = new JTextField();
field1TF.setDisabledTextColor(Color.red);
field2TF = new JTextField();
field2TF.setDisabledTextColor(Color.red);
label = new JLabel("This is a label", JLabel.CENTER);
label.addComponentListener(this);
代码示例来源:origin: stackoverflow.com
textarea.setDisabledTextColor(Color.cyan);
代码示例来源:origin: stackoverflow.com
JLabel lbl = new JLabel("Editable JComboBox");
cmb.setEditable(true);
((JTextField) cmb.getEditor().getEditorComponent()).setDisabledTextColor(Color.red);
((JTextField) cmb.getEditor().getEditorComponent()).setBackground(Color.green);
cmb.setSelectedItem("Just Editable");
((JTextField) cmb2.getEditor().getEditorComponent()).setDisabledTextColor(Color.red);
cmb2.setSelectedItem("London");
cmb3.setSelectedItem("Sydney");
cmb2.setForeground(selected ? Color.blue : Color.red);
if (cmb2.getEditor() != null) {
((JTextField) cmb2.getEditor().getEditorComponent()).setDisabledTextColor(Color.red);
代码示例来源:origin: stackoverflow.com
s3.setBorder(null);
JTextField tf = ((JSpinner.DefaultEditor) s3.getEditor()).getTextField();
tf.setDisabledTextColor(Color.black);
tf.setBackground(Color.white);
tf.setBorder(new LineBorder(Color.blue, 1));
代码示例来源:origin: org.nuiton.thirdparty/rsyntaxtextarea
editor.setDisabledTextColor(c);
代码示例来源:origin: org.codehaus.jtstand/jtstand-editor
editor.setDisabledTextColor(c);
代码示例来源:origin: com.fifesoft/rsyntaxtextarea
editor.setDisabledTextColor(c);
代码示例来源:origin: org.xworker/xworker_core
comp.setDisabledTextColor(disabledTextColor);
代码示例来源:origin: khuxtable/seaglass
c.setDisabledTextColor(style.getColor(context, ColorType.TEXT_FOREGROUND));
代码示例来源:origin: org.opentcs.thirdparty.jhotdraw/jhotdraw
editor.setDisabledTextColor(plaf.getColor(prefix + ".inactiveForeground"));
代码示例来源:origin: org.opentcs.thirdparty.jhotdraw/jhotdraw
editor.setDisabledTextColor(plaf.getColor(prefix + ".inactiveForeground"));
内容来源于网络,如有侵权,请联系作者删除!