hi, i want to detect mouse events on 4 jtextareas.
this is what i have.
Color orange=new Color(228,158,96); add(Texta); Texta.setFont(font); Texta.setForeground(orange); Texta.setBounds(88,386,200,40); Texta.setEditable(false); Texta.setOpaque(false); add(Textb); Textb.setFont(font); Textb.setForeground(orange); Textb.setBounds(410,386,200,40); Textb.setEditable(false); Textb.setOpaque(false); Textb.addMouseListener(this); add(Textc); Textc.setFont(font); Textc.setForeground(orange); Textc.setBounds(88,465,200,40); Textc.setEditable(false); Textc.setOpaque(false); Textc.addMouseListener(this); add(Textd); Textd.setFont(font); Textd.setForeground(orange); Textd.setBounds(410,465,200,40); Textd.setEditable(false); Textd.setOpaque(false); Textd.addMouseListener(this);
how should i handle events?
i want to do some things if mouse enter,exit,or click each of the text.
should i add 4 listeners to the texts or just 1 to the panel?