Re: TextFields related question

This post is from the topic: TextFields related question

27702 newcomer
Posted: 2007-05-21 08:56:43

I tried this but problem is where should i use that method. I tried this as below

// method in Main class to instanciate WinFrame class

public void showWin()
WinFrame wn = new WinFrame()
wn.setVisible(true) ;

wn.setTextFielValue( this )

println( first text ) ;
println( second text) ;

but the problem is program pointer immediately call setTextFieldValue after calling setVisible method. so the both the text variable remain null when i try to print them. It should wait untill i put some texts into both the textfield of WinFrame class and any OK button then Main should call the setText method so that it can return some value.

Can anybody please help me with this


It looks like you are new here. If you want to get involved, click on Join below!