0

i'm trying to update a time component value, from one external gui application which is linked to a main gui in the same package. could any one help in updating or refreshing the gui screen with the time value i modified which is stored in a file.?

**SCHEDULER class:** // responsible for retrieving the time value from stored file and display in the main gui. 

public static void runTask1(Task_Scheduler tes)
{


         if(tes.isActived() >= 1)
        {


            .... (some operations)

            System.out.println("Start time : " + tes.getStartTime());

            worker.executeAtAndRepeat(tes.getStartTime().getTime()); // another class method
        } else
        {
            .....
        }
    } 

**GUI class:** // application that i have to update time.

/* GUI components declaration */
public void update_time()
{
...........
...........
}

public void actionPerformed(ActionEvent e) {

    if(e.getSource()==Ok_button){
        try {
            update_time(); // This method updates my time.
            JOptionPane.showMessageDialog(null, "Updated Successfully !");

            .....

        } catch (Exception e1) {

            e1.printStackTrace();
        }
        scheduler.runTask1(tes);

    }    
}       

**Task_Scheduler class:** // for passing time value as argument in scheduler class.

...
public Timestamp getStartTime()
{
    return startTime;
}
...

Here's what i have tried to query in the past week about the same issue.. Kindly refer this link too, to have a common idea. my previous question

Community
  • 1
  • 1
deepak
  • 25
  • 7
  • 1
    Please post a [MCVE](http://stackoverflow.com/help/mcve). Provide all the classes needed to solve your problem with only the relevant information in them. – user1803551 Mar 25 '14 at 12:48
  • @user1803551 *"Provide all the classes needed to solve your problem with only the relevant information in them."* Nicely put. :) But OP, please be sure to also visit the linked help page on the MCVE. – Andrew Thompson Mar 25 '14 at 13:06
  • @user1803551, s i accept your comment.. but my tool has so many classes interlinked b/w them in multiple packages. I've also given an extra link below the question. can u refer that too and relate with this. thanks for ur reply – deepak Mar 25 '14 at 13:06
  • *"also given an extra link below the question. can u refer that"* Each and *every* question on SO should ideally, be self contained. If it is handy to link back to another thread (especially a long and detailed one with runnable code) do so, but trust me when I tell you that even the process of **making** an MCVE will sometimes help to solve the problem. Please read the link (by @user1803551) carefully. Or more fully, it is also described as an [SSCCE](http://www.sscce.org/).. – Andrew Thompson Mar 25 '14 at 13:09
  • "even the process of making an MCVE will sometimes help to solve the problem." So true. From what I understand you have 2 GUIs in the same package, one reads a file and updates the other with its contents. IF this is the case, just create 2 classes representing the 2 GUIs and if there is something special in the read file provide it also, otherwise we can assume just any text line. I understand that there are dependencies in a project and what not, but help us pinpoint the problem, the code you give is missing too many definitions and is far from "compilable". – user1803551 Mar 25 '14 at 13:27
  • ho dear guys., im restriced to those.. i cant spot what to post clearly. and can understand your expectations. just an idea is enough if not the solution.. – deepak Mar 25 '14 at 14:02
  • @deepak If you want an idea at least address my previous comments regarding the situation you are in. – user1803551 Mar 28 '14 at 22:11

0 Answers0