javax.swing.JDialog.setFocusable()方法的使用及代码示例

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

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

JDialog.setFocusable介绍

暂无

代码示例

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

//Why is this working so well even without the ActionListener interface, and all I'm
//getting is minor format errors at the end brackets? Know how to fix it? 


final JButton newButton = new JButton("Send");
      newButton.setActionCommand("Send");
      textPane.add(newButton);
      newButton.setEnabled(true);
      newButton.addActionListener(new ActionListener();

         public void actionPerformed(ActionEvent e){

          // display/center the jdialog when the button is pressed
          JDialog digFree = new JDialog(digFree, "Hello", true);
          digFree.setLocationRelativeTo(newButton);
          digFree.setFocusable(true);
          digFree.setVisible(true);
          digFree.setBounds(20, 20, 100, 120);
         }

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

private void init(){
  autoSuggestProvider =  new DefaultAutoSuggestProvider();
  lastWord = "";
  regular = getFont();
  busy = new Font(getFont().getName(), Font.ITALIC, getFont().getSize());
  suggestions = new Vector<String>();
  defaultText = DEFAULT_TEXT;
  dialog = new JDialog();
  dialog.setUndecorated(true);
  dialog.setFocusableWindowState(false);
  dialog.setFocusable(false);
  initSuggestionList();
}

代码示例来源:origin: MegaMek/mekhq

d.setUndecorated(true);
d.setFocusableWindowState(false);
d.setFocusable(false);
list = new JList<String>();
list.addMouseListener(new MouseListener() {

相关文章

JDialog类方法