java.awt.Button.setFocusable()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(2.6k)|赞(0)|评价(0)|浏览(147)

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

Button.setFocusable介绍

暂无

代码示例

代码示例来源:origin: com.h2database/h2

startBrowser.setFocusable(false);
startBrowser.setActionCommand("console");
startBrowser.addActionListener(this);

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

alertDialog.setOnShowListener(new DialogInterface.OnShowListener(){
   @Override
   public void onShow(DialogInterface dialog) {
     Button negative = alertDialog.getButton(AlertDialog.BUTTON_NEGATIVE);
     negative.setFocusable(true);
     negative.setFocusableInTouchMode(true);
     negative.requestFocus();
   }
 });
 alertDialog.show();

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

final ScrollView s = (ScrollView)findViewById(R.id.ScrollView01);
s.post(new Runnable() {
    public void run() {
       EditText editText =(EditText) findViewById(R.id.yourEditText);
       (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE))
          .hideSoftInputFromWindow(editText.getWindowToken(), 0);

       Button button =(Button) findViewById(R.id.SaveProfileEditingButton);
       button.setFocusable(true);
       button.requestFocus();
   }
});

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

// Set the focus to the calculate button so the keyboard won't show up automatically 
Button calcButton = (Button)findViewById( R.id.ac_button_calculate );
calcButton.setFocusable( true );
calcButton.setFocusableInTouchMode( true ); 
calcButton.requestFocus();

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

public void onClick(View v) {
  btn_map.requestFocus();
  btn_map.setFocusable(true);
  SharedPreferences.Editor prefsEditor = prefs.edit();
  prefsEditor.putInt("settings", 1);
public void onClick(View v) {
  btn_name.requestFocus();
  btn_name.setFocusable(true);
  SharedPreferences.Editor prefsEditor = prefs.edit();
  prefsEditor.putInt("settings", 0);

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

alertDialog.setOnShowListener(new DialogInterface.OnShowListener(){
   @Override
   public void onShow(DialogInterface dialog) {
     Button positive= alertDialog.getButton(AlertDialog.BUTTON_POSITIVE);
     positive.setFocusable(true);
     positive.setFocusableInTouchMode(true);
     positive.requestFocus();
   }
 });

代码示例来源:origin: com.h2database/com.springsource.org.h2

startBrowser.setFocusable(false);
startBrowser.setActionCommand("console");
startBrowser.addActionListener(this);

代码示例来源:origin: org.wowtools/h2

startBrowser.setFocusable(false);
startBrowser.setActionCommand("console");
startBrowser.addActionListener(this);

代码示例来源:origin: com.eventsourcing/h2

startBrowser.setFocusable(false);
startBrowser.setActionCommand("console");
startBrowser.addActionListener(this);

相关文章