This week's book giveaway is in the General Computing forum. We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line! See this thread for details.
i am working with a Swing GUI project where I want to accept user input in a
text field
I have used singleton pattern which will create only one instance of object
due to this when i move from one scree to another the input of textfield
doesnt updated I have used setText method to clear the JTextField but it wont
works
I have attached the code here which consists of two files
Program one -- 1st screen
program 2 - 2nd screen
In this application the status of TextField input remain same means it shows
the earlier input in the textfield wnen I come to earlier or next screen.
what is the solution to clear the TextField input while moving from 1st
scrren to 2nd screen.
You are adding an action listener to the button inside one action listener. So who calls the first action listener? If the action listener is never called, do you think the setText("") would ever be executed?
Hello Michael I Think These site managed separately by different groups.
I am really sorry for cross posting.
Please help in the above situation.
Michael Dunn
Ranch Hand
Joined: Jun 09, 2003
Posts: 4632
posted
0
> Please help in the above situation.
posting everywhere indicates my time is unimportant to you,
therefore you getting a solution is equally unimportant to me.
harsh rocking
Greenhorn
Joined: Apr 26, 2010
Posts: 12
posted
0
Michael Dunn wrote:> Please help in the above situation.
posting everywhere indicates my time is unimportant to you,
therefore you getting a solution is equally unimportant to me.
I am sorry I am new to all these forums I don't know about the multiple posting
I will follow the code of conducts here on Michael.
Please share your knowledge with me. I am working on this code on last few
days but I am unable to solve this. Please help me your time is very important for me.
I am sorry..
Maneesh Godbole wrote:Did you read my previous reply?
Please help me I am novice to the Swing
the application might needs to use observer design pattern I think
I am also tried it but it wont work. I had worj on above code lot.
Please help me
Since you are not willing to answer even simple questions like "did you read my previous reply" I do not see how else to further help you.
harsh rocking
Greenhorn
Joined: Apr 26, 2010
Posts: 12
posted
0
Maneesh Godbole wrote:Since you are not willing to answer even simple questions like "did you read my previous reply" I do not see how else to further help you.
Yes I have read your earlier post and go through the link you have posted their.
As you say setText("") is executing properly but it is unable to clear the TextField in the GUI
The above application is working properly and is response to the button action very well
the problem is that I have used singleton design pattern which create only one object
of the Class if I doesn't use singleton then it works properly but that is bad coding as it create new object
each time. So in singleton approach their is single object which is unable to update the state next time
when i call setText("") function to clear the textField
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.
subject: unable to clear text box in Multi Screen JFrame GUI Application