Here's the situation and what I've done so far - I have a JFrame in my program, which is instantiating a JDialog. Each of the two contain a JTextField. When I type in the JDialog's JTextField and press Enter, its text should be passed to JFrame's JTextField. I have tried to solve this in 2 ways. The code that I've written is as follows -
I basically want to wait on JDialog's input before doing further processing. Could someone please advice me as to which one of the above ways is ok? These 2 are the ones I've done so far. Any other ways/suggestions are highly appreciated.
if you set both textfields to share the same document, no need to press enter
Roshni Singhania
Ranch Hand
Joined: Mar 11, 2007
Posts: 78
posted
0
Hi,
I didn't know much about the document of the textfield. So I looked it up after reading your reply. It solved my problem. Thanks you very much. You helped a lot.
Originally posted by Michael Dunn: > When I type in the JDialog's JTextField and press Enter, its text should be passed to JFrame's JTextField.
if you set both textfields to share the same document, no need to press enter
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.