Pass « Event « Java Swing Q&A





1. Passing data between two seperate .java files    stackoverflow.com

I'm learning Java and I happened to come across an ActionListener example from Fred Swartz's leepoint.net webpage. DogYears2.java. For the sake of learning, I experimented by seperating the ActionListener ConvertBtnListener from the ...

2. Passing key strokes between objects    coderanch.com

3. How to pass GUI data to custom Swing actions ?    coderanch.com

Hi all, I am working on one of my first bigger Swing applications and encounter an unexpected but nasty problem. My application consist of several panels which all of them contain some controls, among them buttons. Most of the simple learning-book examples use anonymous listener classes to add some functionality to a button: JButton aButton = new JButton(new ActionListener() { public ...

4. Help with passing events between components.    coderanch.com

perhaps the simplest way is to set the dialog's modality to true, then when you create the dialog you also call the method that will return the data. the data will not be returned until the dialog disposes (or visible false). simple demo (click 'get name', enter something into the textfield, click 'ok' import javax.swing.*; import java.awt.*; import java.awt.event.*; class Testing ...

5. How to pass events up a GUI hierarchy    java-forums.org

Sounds like a TimeToChangeImageEvent. There was a similar thread to this one in the past couple of weeks. It referred to an existing mechanism in Java to handle new user defined events. I don't remember what the name of the class was. But it handled all the bookkeeping. Myself, I like to roll-my-own: Define a new TimeToChangeEvent class, an addTimeToChangeImageListener() method, ...

6. Passing event from GUI    forums.oracle.com

So I'm fairly new to the Java game, and have a question about using a separate class for an application's GUI. I'm coding a Sudoku puzzle generator/solver, and currently have a class called Puzzle, which will represent the puzzle being worked on, and another class called GUI, which actually builds the interface using Swing. Now, the Puzzle class creates the GUI ...