Pilot Study of Selective Messages
Message thread:Message Description:
The poster has no idea how button ActionListener works. He can define a button in different ways:
JButton b1 = new JButton("Hi!");
JButton b2 = new JButton("How are you?");
JButton b3 = new JButton(new ImageIcon("image.gif"));Therefore, no matter how the button's GUI was set, the code can easily distinguish each button.
Message type:goal-oriented;
Q&A process:
q1-a1-a2(solution)-a3-a4-a5What is the situation of the Q/A?no confirmation of solution; but the solution has been provided
With code/not:providing solution
Communication media (code/image/word....): word description; pseudo codeSwing category: Button specific--button action listener;Status of Code:questioning and solution
Other description:
basic question: how to distinguish multiple buttons that share an action listener.