求这段Java代码中(this)的用法,(this)指代的是什么
来源:学生作业帮 编辑:搜搜考试网作业帮 分类:综合作业 时间:2024/06/25 05:27:40
求这段Java代码中(this)的用法,(this)指代的是什么
import javax.swing.*;
import java.awt.event.*;
import javax.swing.JOptionPane;
class ExceptionFrame extends JFrame implements ActionListener
{
JTextField t1,t2,t3;
JButton b1;
JLabel l1;
public ExceptionFrame()
{
t1= new JTextField(10);
t2= new JTextField(10);
l1= new JLabel("+");
b1= new JButton("计算");
t3= new JTextField(30);
b1.addActionListener(this);
import javax.swing.*;
import java.awt.event.*;
import javax.swing.JOptionPane;
class ExceptionFrame extends JFrame implements ActionListener
{
JTextField t1,t2,t3;
JButton b1;
JLabel l1;
public ExceptionFrame()
{
t1= new JTextField(10);
t2= new JTextField(10);
l1= new JLabel("+");
b1= new JButton("计算");
t3= new JTextField(30);
b1.addActionListener(this);
![求这段Java代码中(this)的用法,(this)指代的是什么](/uploads/image/z/8060858-26-8.jpg?t=%E6%B1%82%E8%BF%99%E6%AE%B5Java%E4%BB%A3%E7%A0%81%E4%B8%AD%EF%BC%88this%EF%BC%89%E7%9A%84%E7%94%A8%E6%B3%95%2C%EF%BC%88this%EF%BC%89%E6%8C%87%E4%BB%A3%E7%9A%84%E6%98%AF%E4%BB%80%E4%B9%88)
ExceptionFrame 这个类的对象
再问: 能说得稍微明白点么,谢谢~~
再答: 一个类里面的 this 就是指这个类本身啊, 不过this指的这个类是实例对象, 不是类,
再问: 能说得稍微明白点么,谢谢~~
再答: 一个类里面的 this 就是指这个类本身啊, 不过this指的这个类是实例对象, 不是类,
求这段Java代码中(this)的用法,(this)指代的是什么
java代码里面的this关键字的作用是什么哦,
java中关键字 this 和super的作用及用法
java中this的作用及用法?在什么情况下需要用this
js中关于this指代的问题
THIS,THAT和IT的指代用法有什么区别
THIS、THAT和IT的指代用法有什么区别?
JAVA 中super 和this 的区别?
php中 $this->...= ,&,的用法是什么
java 语言的“this”的三种用法
JAVA中super()的用法?
下面java代码运行时提示search():This method must return a result of ty