我让我的游戏没有鼠标运行所以使用指针不是一个选择.当玩家输球时,高分菜单会显示.
这是我的代码
highScore=new MyTextField("Your Name");
highScore.addKeyListener(this);
highScore.setFont(font);
highScore.requestFocusInWindow();
Run Code Online (Sandbox Code Playgroud)
我试过了
highScore.setFocusable(true);
highScore.requestFocusInWindow();
highScore.requestFocus(true);
highScore.requestFocus();
Run Code Online (Sandbox Code Playgroud)
但仍然没有把重点放在我的身上JTextField.
如何关注它?
我想分发我的*.jar文件.我的意思是我的应用程序使用,但我不希望用户或任何人提取我的资源(声音,图片和其他).
如何保护它?
谢谢
这是我的代码
function add() {
if(!empty($this->data)) {
if($this->Post->save($this->data)) {
if($this->RequestHandler->isAjax()){ //isAjax method is deprecated.
//Handle Ajax
$this->render('notif','ajax');
} else {
$this->Session->setFlash('Add successfully');
$this->redirect(array('action'=>'index'));
}
}
else {
$this->Session->setFlash('Add failded please try again');
}
}
}
Run Code Online (Sandbox Code Playgroud)
在这里,我读到该方法已被弃用http://book.cakephp.org/2.0/en/appendices/2-0-migration-guide.html?highlight=isajax
如何解决?
java ×2
audio ×1
cakephp-2.0 ×1
image ×1
jquery ×1
jtextfield ×1
resources ×1
setfocus ×1
swing ×1