2

I would like for the GUI/JFrame of my Java application to display meaningful loading messages as is commonplace. How is it possible or what is the most refined way of passing loading messages to the JFrame class from a Class which is only running one method - so there will be sub-steps within the method?

2 Answers 2

2

You can use SwingWorker for your background task and pass data through the process() method call, as described here: http://download.oracle.com/javase/6/docs/api/javax/swing/SwingWorker.html

Sign up to request clarification or add additional context in comments.

Comments

1

By loading do you mean that your non-GUI class is performing background processing, and you would like to show that this is happening to the user? If so, two things come to mind:

1 Comment

This is what I mean yeah, specifically I'm wondering about writing messages at stages within a method. I understand how this will be displayed, just not how the message should be passed from within a method to another class.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.