Topic: [求助]这是怎么了?(我还没编写,怎么功能就实现了!)

  Print this page

1.[求助]这是怎么了?(我还没编写,怎么功能就实现了!) Copy to clipboard
Posted by: guliusuo
Posted on: 2006-10-30 11:58

import java.awt.*;
import java.awt.event.*;
public class W9 extends Frame{
TextArea ta=new TextArea();
W9(){
super("弹出菜单");
setSize(400,200);
addWindowListener(new WindowAdapter(){
public void windowClosing(WindowEvent e){
System.exit(0);
}
});
add(ta);
setVisible(true);
}
public static void main(String args[]){
new W9();
}
}

这个程序我还没创建弹出菜单,运行程序时,在文本区里单出右键,怎么会有弹出菜单出现?
我的JDK版本是j2sdk1.4.2_07,是不是版本的问题?

2.Re:[求助]这是怎么了?(我还没做,怎么就有了!) [Re: guliusuo] Copy to clipboard
Posted by: guliusuo
Posted on: 2006-10-30 12:00

请求高手,帮忙!!!

3.Re:[求助]这是怎么了?(我还没编写,怎么功能就实现了!) [Re: guliusuo] Copy to clipboard
Posted by: guliusuo
Posted on: 2006-11-03 15:11

怎么没人回贴啊!!!!

4.Re:[求助]这是怎么了?(我还没编写,怎么功能就实现了!) [Re: guliusuo] Copy to clipboard
Posted by: cxp108
Posted on: 2006-11-03 15:25

我的测试没有出现弹出菜单

你运行错类了吧?

我测试环境:

JDK 1.5.0 + Netbeans 5.5 beta

Ubuntu Linux 6.06LTS

5.Re:[求助]这是怎么了?(我还没编写,怎么功能就实现了!) [Re: guliusuo] Copy to clipboard
Posted by: guliusuo
Posted on: 2006-11-04 17:34

我检查过了,没有运行错类!
我的测试环境:
j2sdk1.4.2_07 + 记事本
Windows Xp
会不会跟Windows操作系统有关系?

6.Re:[求助]这是怎么了?(我还没编写,怎么功能就实现了!) [Re: guliusuo] Copy to clipboard
Posted by: cxp108
Posted on: 2006-11-05 09:34

有可能

因为你使用的TextArea是Awt组件
Awt是有部分是基于操作系统的原生组件,不同操作系统可能有完全不同的结果


   Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent
Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1
客服电话 18559299278    客服信箱 714923@qq.com    客服QQ 714923