Question : Raising an event

Ok, so here's the problem.

I have a TextBox, contained within a JPanel, which is contained within a JFrame. When I hit the 'enter' key, I want to be able to detect it in the JFrame.


Any ideas?





Answer : Raising an event

you could add a method that added listener to textbox

public void addKeyListener(KeyListener listener) {
   theDefaultTextBox.addKeyListener(listener);
}
Random Solutions  
 
programming4us programming4us