swing多个JTextArea组成的控件数组问题

来源:百度知道 编辑:UC知道 时间:2024/06/01 05:21:33
JTextArea t01 = new JTextArea();

JTextArea t02 = new JTextArea();

JTextArea t03 = new JTextArea();

JTextArea t04 = new JTextArea();

JTextArea t05 = new JTextArea();

JTextArea t06 = new JTextArea();

JTextArea t07 = new JTextArea();

JTextArea t11 = new JTextArea();

JTextArea t12 = new JTextArea();

JTextArea t13 = new JTextArea();

JTextArea t14 = new JTextArea();

JTextArea t15 = new JTextArea();

JTextArea t16 = new JTextArea();

JTextArea t17 = new JTextArea();

JTextArea t21 = new JTextArea();

JTextArea t22 = new JTextArea();

JTextArea t23 = new JTextArea();

JTextArea t24 = new JTextArea();

JTextArea t25 = new JTextArea();

JTextArea t26 = new JTextArea();

JTextArea t27 = new JTextArea();

JTextArea t31 = new JTextArea();

JTextArea

在event里 有方法来获取事件源头的

MouseEvent 可以获得当前鼠标发生事件 所在的容器
一般返回是 Component

getComponent

public Component getComponent()
返回事件的始发者。
返回:
发起事件的 Component 对象,如果该对象不是一个 Component,则返回 null。