This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Soft Skills and have John Sonmez on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes setText happens too late Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "setText happens too late" Watch "setText happens too late" New topic
Author

setText happens too late

K Miller
Greenhorn

Joined: Sep 02, 2012
Posts: 1
I've managed to piece [redacted] together with what little I know.

Edit: Back to the basics.
Winston Gutkowski
Bartender

Joined: Mar 17, 2011
Posts: 8418
    
  23

K Miller wrote:I've managed to piece this together with what little I know...

And therein, I suspect, lies the problem.

I'm afraid I don't even want to try and untangle what you've written; save to say that it's WRONG.
Even if it works, nobody in his/her right mind would even try to maintain it.

If it's an attempt at a 'fluid interface' (and I suspect it isn't), it's ill-conceived, because the idea of fluid interfaces is
(a) readability
(b) simplicity of methods
neither of which you've achieved.

My suggestion: Back up, and work out what you want to do. And do it with your computer turned OFF, and in English (or your native language).

Programming is NOT about coding; it's about thinking; and what you've written qualifies for the Jean-Paul Sartres School of Programming:
"I've got a problem; let's start coding and see if a solution simply materializes."

Be advised: the school is very large; but contains very few professional programmers.

Winston
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18987
    
    8

I too am not going to read 500 lines of code. But if you are finding that things are not happening in the right order, then probably you didn't stumble across the fact that you have to handle threads in Swing applications carefully. Here's the tutorial to read: Lesson: Concurrency in Swing.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: setText happens too late