本文整理了Java中javax.swing.JTextArea.requestFocusInWindow()
方法的一些代码示例,展示了JTextArea.requestFocusInWindow()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JTextArea.requestFocusInWindow()
方法的具体详情如下:
包路径:javax.swing.JTextArea
类名称:JTextArea
方法名:requestFocusInWindow
暂无
代码示例来源:origin: checkstyle/checkstyle
/**
* Set selection.
*/
public void select() {
pModel.findSelectionPositions();
editor.setSelectedTextColor(Color.blue);
editor.requestFocusInWindow();
editor.setCaretPosition(pModel.getSelectionStart());
editor.moveCaretPosition(pModel.getSelectionEnd());
}
代码示例来源:origin: stackoverflow.com
textArea.requestFocusInWindow();
代码示例来源:origin: ron190/jsql-injection
@Override
public void mousePressed(MouseEvent e) {
super.mousePressed(e);
textarea.requestFocusInWindow();
}
});
代码示例来源:origin: ron190/jsql-injection
@Override
public void mousePressed(MouseEvent e) {
super.mousePressed(e);
DialogTranslate.this.textToTranslate[0].requestFocusInWindow();
}
});
代码示例来源:origin: org.integratedmodelling/klab-common
/**
* This method aids outside interfaces (such as DragonConsoleFrame) by allowing it to
* give Focus to the inputArea. This method is only useful if
* <code>useInlineInput</code> is <code>false</code>.
*/
public void setInputFocus() {
if (!useInlineInput)
inputArea.requestFocusInWindow();
}
代码示例来源:origin: bbuck/DragonConsole
/**
* This method aids outside interfaces (such as DragonConsoleFrame) by
* allowing it to give Focus to the inputArea. This method is only useful
* if <code>useInlineInput</code> is <code>false</code>.
*/
public void setInputFocus() {
if (!useInlineInput)
inputArea.requestFocusInWindow();
}
代码示例来源:origin: Multibit-Legacy/multibit-hd
@Override
public void afterShow() {
notesTextArea.requestFocusInWindow();
}
代码示例来源:origin: Multibit-Legacy/multibit-hd
@Override
public void afterShow() {
paymentMemo.requestFocusInWindow();
}
代码示例来源:origin: com.itextpdf/itext-rups
public void componentShown(ComponentEvent ce) {
textArea.requestFocusInWindow();
}
});
代码示例来源:origin: Multibit-Legacy/multibit-hd
@Override
public void afterShow() {
messageTextArea.requestFocusInWindow();
}
代码示例来源:origin: Multibit-Legacy/multibit-hd
@Override
public void afterShow() {
messageTextArea.requestFocusInWindow();
}
代码示例来源:origin: Multibit-Legacy/multibit-hd
@Override
public void requestInitialFocus() {
if (showTimestamp) {
seedTimestampText.requestFocusInWindow();
} else if (showSeedPhrase) {
seedPhraseTextArea.requestFocusInWindow();
}
}
代码示例来源:origin: Multibit-Legacy/multibit-hd
@Override
public void run() {
paymentACKMemo.requestFocusInWindow();
// Transaction must be progressing in some manner
if (lastPaymentSentToRequestorEvent != null) {
onPaymentSentToRequestorEvent(lastPaymentSentToRequestorEvent);
lastPaymentSentToRequestorEvent = null;
}
}
});
代码示例来源:origin: stackoverflow.com
JTextArea textArea = new JTextArea();
textArea.setEditable(true);
JScrollPane scrollPane = new JScrollPane(textArea);
scrollPane.requestFocus();
textArea.requestFocusInWindow();
scrollPane.setPreferredSize(new Dimension(800, 600));
JOptionPane.showMessageDialog(
(ControlWindow) App.controller.control, scrollPane,
"Paste Info", JOptionPane.PLAIN_MESSAGE);
String info = textArea.getText();
代码示例来源:origin: org.apache.uima/uimaj-tools
@Override
public void actionPerformed(ActionEvent arg0) {
this.main.getTextArea().requestFocusInWindow();
}
代码示例来源:origin: stackoverflow.com
public static void main(String[] args) {
final JFrame frame = new JFrame("Selected Color Example");
frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
final JTextArea area = new JTextArea("Text for test...", 5, 10);
frame.add(area, BorderLayout.CENTER);
JButton button = new JButton("Select Color");
button.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
Color color = JColorChooser.showDialog(frame, "Colors",
Color.BLUE);
area.selectAll();
// area.setSelectedTextColor(color); // color of selected text
area.setSelectionColor(color); // background of selected text
area.requestFocusInWindow();
}
});
frame.add(button, BorderLayout.PAGE_END);
frame.pack();
frame.setVisible(true);
}
代码示例来源:origin: stackoverflow.com
public void setupPanel() {
final JTextArea textArea = new JTextArea();
textArea.setText("Write your response here");
textArea.addAncestorListener(new AncestorListener() {
public void ancestorRemoved(AncestorEvent event) { }
public void ancestorMoved(AncestorEvent event) { }
public void ancestorAdded(AncestorEvent event) {
if (event.getSource() == textArea) {
textArea.selectAll();
textArea.requestFocusInWindow();
}
}
});
add(textArea);
}
代码示例来源:origin: UNIVALI-LITE/Portugol-Studio
@Override
public void run()
{
AbaConsole.this.selecionar();
console.requestFocusInWindow();
abaCodigoFonte.exibirPainelSaida();
if (texto != null)
{
console.append(texto);
}
else
{
console.setText(null);
}
}
});
代码示例来源:origin: UNIVALI-LITE/Portugol-Studio
@Override
public void solicitaEntrada(final TipoDado tipoDado, final Armazenador armazenador) throws InterruptedException
{
SwingUtilities.invokeLater(() ->
{
AbaConsole.this.selecionar();
setLendo(true);
abaCodigoFonte.exibirPainelSaida();
DocumentoConsole.this.armazenador = armazenador;
DocumentoConsole.this.tipoDado = tipoDado;
console.setEditable(true);
console.setFocusable(true);
console.getCaret().setVisible(true);
console.setCaretPosition(console.getText().length());
console.requestFocusInWindow();
agendarPopupLeia();
});
}
代码示例来源:origin: com.puppycrawl.tools/checkstyle
/**
* Set selection.
*/
public void select() {
pModel.findSelectionPositions();
editor.setSelectedTextColor(Color.blue);
editor.requestFocusInWindow();
editor.setCaretPosition(pModel.getSelectionStart());
editor.moveCaretPosition(pModel.getSelectionEnd());
}
内容来源于网络,如有侵权,请联系作者删除!