88问答网
所有问题
当前搜索:
setvisible
求个简单点的Java程序 100行左右。 需要解释。
答:
grid[i][j].
setVisible
(false);grid[i][j].addKeyListener(this);grid[i][j].setBackground(Color.blue);} //蛇体初始化 grid[10][10].setVisible(true);grid[11][10].setVisible(true);grid[12][10].setVisible(true);grid[13][10].setVisible(true);grid[14][10].setVisible(true)...
java windows记事本源代码
答:
chooser.
setVisible
(true); int i=chooser.showSaveDialog(this); String path=null; if(i==JFileChooser.APPROVE_OPTION){ path=chooser.getSelectedFile().getPath(); return path; }else return null;}public boolean writer(String paths){ //String paths=savePath(); FileWriter fw; try { fw = new Fil...
单片机LCD1602显示程序(汇编),小弟有很多地方不懂,希望高人能加上注释...
答:
; LCD Display Driver Demo.; Timing code assumes 1.2MHz Clock ;LCD Registers addresses LCD_CMD_WRequ 0 ;宏定义 LCD_DATA_WRequ1 LCD_BUSY_RDequ2 LCD_DATA_RDequ3 ;LCD Commands LCD_CLSequ1 LCD_HOMEequ2 LCD_SETMODEequ4 LCD_
SETVISIBLE
equ8 LCD_SHIFTequ16 LCD_SETFUNCTIONequ...
JAVA画图板程序,用netbeans做,要求画圆,椭圆,直线,三角形,矩形,可以...
答:
openPicture.
setVisible
(true); if(openPicture.getFile()!=null) { int tempflag; tempflag = toolFlag; toolFlag = 2 ; repaint(); try{ paintInfo.removeAllElements(); File filein = new File(openPicture.getDirectory(),openPicture.getFile()); picIn = new FileInputStream(filein); VIn = new...
用java编一个程序,实现两个人玩“石头、剪刀、布”,要求用枚举类型定义...
答:
public class Test {public enum Hand{//猜拳枚举ROCK,SCISSORS,PAPER;public static Hand getHand(int index){Hand hand = null;switch (index) {case 0:hand = Hand.ROCK;break;case 1:hand = Hand.SCISSORS;break;case 2:hand = Hand.PAPER;break;default:hand = Hand.ROCK;break;}return ...
用JAVA实现的图形编辑器
答:
openPicture.
setVisible
(true); if(openPicture.getFile()!=null) { int tempflag; tempflag = toolFlag; toolFlag = 2 ; repaint(); try{ paintInfo.removeAllElements(); File filein = new File(openPicture.getDirectory(),openPicture.getFile()); picIn = new FileInputStream(filein); VIn = new...
使用java application完成程序设计
答:
openfile.
setVisible
(false); } }); sizechoice=new Choice(); sizechoice.add("1"); sizechoice.add("2"); sizechoice.add("4"); sizechoice.add("6"); sizechoice.add("8"); sizechoice.addItemListener(this); colorchoice=new Choice(); colorchoice.add("black"); colorchoice.add("red");...
制作java计算器
答:
setVisible
(true); } //构造监听器 class Bt implements ActionListener { public void actionPerformed(ActionEvent e2) { try{ if(e2.getSource()==b1)//选择"CE"清零 { tf1.setText("0");//把显示屏清零 str.setLength(0);//清空字符串缓冲区以准备接收新的输入运算数 } else if(e2.getSource()==...
求助高手!!java连连看数字改图片问题
答:
this);southPanel.add(exitButton);southPanel.add(resetButton);southPanel.add(newlyButton);fractionLable.setText(String.valueOf(Integer.parseInt(fractionLable .getText()));northPanel.add(fractionLable);mainFrame.setBounds(280, 100, 500, 450);mainFrame.
setVisible
(true);} ...
SWT监听全局键盘输入
答:
这个需要键盘钩子解决,SWT自带这些listener都是要组件获取焦点才有效,你的shell都最小化了,那么什么listener都不起效如果你会c++就用c++写一个键盘钩子,不会就引入swt win32 extension,里面有hook,用这个注册个键盘事件,就可以监听任何情况下的键盘事件。代码如下:Hook.KEYBOARD.addListener(Test.this,...
首页
<上一页
6
7
8
9
11
12
13
14
10
15
下一页
尾页
其他人还搜