source « Event « Java Swing Q&A





1. action listeners and event sources in Swing    stackoverflow.com

OK, so if I add an ActionListener to a GUI element, and it's the only element I use that ActionListener with, does it matter which of the following lines (a,b) I ...

2. java mouseadapter source not found    stackoverflow.com

I have an array of JPanels and I'm trying to add a mouseadapter to each one so it will be possible to identify which one was clicked and then change its ...

3. the relationship between evet listener and event source in Java    stackoverflow.com

what is the relationship between evet listener and event source in Java ? and i have another question what is the difference between java application and java applet ? any help thanks in advance ...

4. Java Swing programming structure: are listeners supposed to be the source of almost all Swing components?    stackoverflow.com

My question boils down to this: is it standard structure in Swing programming to give listeners control over new components (e.g a new JPanel) for display and input, and to give ...

5. KeyAdapter Problem, With Source Code    coderanch.com

OK, here is the same problem but with a simple example to demonstrate the problem. If you run this program, you will find that ONLY "FrameListener: keyPressed" is displayed. "PanelListener: keyPressed" is never displayed, but I would like it to be. import java.awt.event.KeyAdapter; import java.awt.event.KeyEvent; import java.awt.event.KeyListener; import javax.swing.JButton; import javax.swing.JComponent; import javax.swing.JFrame; import javax.swing.JPanel; import javax.swing.JTextField; /** * Simple class ...

6. Swing - Listener with multiple sources problem    coderanch.com

hey, i am designing a GUI for class timetables in my college and i have encountered the following problem: In the 'Master' frame i want the components at the top of the frame to change when the JRadioButtons do, i have four JRadioButtons in 2 ButtonGroups. they are -> o Class o Lecturer and -> o Add o Remove so different ...

7. Registering ActionListener with two Sources    coderanch.com

Hi, I am working on a Swing application that has 3 ComboBoxes and a Button. I have added ActionListeners to all these components. Now, what I want is when an item is selected from the ComboBox and the Button is pressed, some action should happen. I tried something like : button.addActionListener(this); combo1.addActionListener(this); combo2.addActionListener(this); ... public void actionPerformed (ActionEvent e) { if ...