Timer event refresh event

Hello people in the java world
I am developing a GUI based program and I require the GUI to be refreshed automatically every minute.
Any help with this is much appriciated.
Message was edited by:
bazza345
Message was edited by:
bazza345

1. Create a timer
2. Start it with a thread
3. Every minute, have the timer wake up and call repaint()

Similar Messages

  • In setting up my ICal calendar I have specific times (as new events) that I want to be included in the print out.  This doesn't happen.

    In setting up my ICAL calendar I have specific times (as new events) for each day.  When it prints out the time does not show up (rather its a bar).  I would like the time for each appointment to print out. How do I do this?

    These are two possible approaches that will normally work to move an existing library to a new computer.
    Method 1
    Backup the library with this User Tip.
    Deauthorize the old computer if you no longer want to access protected content on it.
    Restore the backup to your new computer using the same tool used to back it up.
    Keep your backup up-to-date in future.
    Method 2
    Connect the two computers to the same network. Share your <User's Music> folder from the old computer and copy the entire iTunes library folder into the <User's Music> folder on the new one. Again, deauthorize the old computer if no longer required.
    Both methods should give the new computer a working clone of the library that was on the old one. As far as iTunes is concerned this is still the "home" library for your devices so you shouldn't have any issues with iTunes wanting to erase and reload.
    I'd recommend method 1 since it establishes an ongoing backup for your library.
    Note if you have failed to move contacts and calendar items across you should create one dummy entry of each in your new profile and iTunes should  merge the existing data from the device.
    If your media folder has been split out from the main iTunes folder you may need to do some preparatory work to make it easier to move. See make a split library portable.
    Should you be in the unfortunate position where you are no longer able to access your original library or a backup then then see Recover your iTunes library from your iPod or iOS device for advice on how to set up your devices with a new library with the maximum preservation of data.
    tt2

  • Can I hide the set time in the event boxes in Week View?

    Can I hide the set time in the event boxes in the Week View?

    David
    No way around this that I can find. That toolbar pops up if you pause the show.
    The nearest I could figure is to use the settings button for a long slide - 'Play each slide for 120 seconds' then tapping the arrows will move the slides along without showing the toolbar. And the 120 second slide is almost as good as a pause.
    iPhoto menu -> Provide iPhoto Feedback
    Regards
    TD

  • Error 1046: Type was not found or was not a compile-time constant: Component Event.

    Hi Everyone..
    I am getting an Error 1046: Type was not found or was not a compile-time constant: Component Event.
    The ComponentEvent class has been imported,and also the event handling code is there. I am not sure what else is wrong, hope somebody can advise me. Thanks. The code is below, the point where the error occurs as indicated by the compiler has been highlighted.
    package 
    import flash.display.Sprite;
    import flash.media.Camera;
    import flash.media.Microphone;
    import flash.media.Video;
    import fl.controls.TextArea;
    import fl.controls.Button;
    import fl.controls.TextInput;
    import flash.events.SyncEvent;
    import flash.events.MouseEvent;
    import flash.events.FocusEvent;
    import flash.net.SharedObject;
    import flash.net.NetConnection;
    import flash.net.NetStream;
    import flash.events.NetStatusEvent;
    import flash.events.FocusEvent;
    import flash.events.ComponentEvent;
    public class VideoChat extends Sprite
      private var button:Button;
      private var text_so:SharedObject; 
      private var textArea:TextArea;
      private var textInput:TextInput;
      private var chatName:TextInput; 
      private var nc:NetConnection;
      private var nsOut:NetStream;
      private var nsIn:NetStream;
      private var rtmpNow:String;
      private var msg:Boolean; 
      private var cam:Camera;
      private var mic:Microphone;
      private var vid:Video;
      public function VideoChat ()
       //Set up UI
       textArea = new TextArea();
       textArea.setSize(500,280);
       textArea.move(20,54);
       addChild(textArea);
       textInput = new TextInput();
       textInput.setSize(500,24);
       textInput.move(20,340);
       textInput.addEventListener(ComponentEvent.ENTER,checkKey);
       addChild(textInput);
       button = new Button();
       button.width=50;
       button.label="Send";
       button.move(20,370);
       button.addEventListener(MouseEvent.CLICK, sendMsg);
       addChild(button);
       chatName = new TextInput;
       chatName.setSize (100,24);
       chatName.move (80,370);
       chatName.text="<Enter Name>";
       chatName.addEventListener (FocusEvent.FOCUS_IN, cleanName);
       addChild(chatName); 
       //Connect
       rtmpNow="rtmp:/VideoChat ";  
       nc=new NetConnection;
       nc.connect (rtmpNow);
       nc.addEventListener(NetStatusEvent.NET_STATUS,doSO);
       cam = Camera.getCamera();
       mic=Microphone.getMicrophone();
       //Camera Settings
       cam.setKeyFrameInterval(15);
       cam.setMode (240, 180, 15, false);
       cam.setMotionLevel(35,3000);
       cam.setQuality(40000 / 8,0);
       //Microphone Settings
       mic.gain = 85;
       mic.rate=11;
       mic.setSilenceLevel (25,1000);
       mic.setUseEchoSuppression (true);
       //Video Setup
       vid=new Video(cam.width, cam.height);
       addChild (vid);
       vid.x=10, vid.y=20;  
       //Attach local video and camera
       vid.attachCamera(cam);  
      private function doSO(e:NetStatusEvent):void
       good=e.info.code == "NetConnection.Connect.Success";
       if(good)
        //Set up shared object
        text_so=SharedObject.getRemote("test", nc.uri, false);
        text_so.connect (nc);
        text_so.addEventListener(SyncEvent.SYNC, checkSO);
      private function checkSO(e:SyncEvent):void
       for (var chung:uint; change<e.changeList.length; chng++)
        switch(e.chageList[chng].code)
         case "clear":
          break;
         case "success":
          break;
         case "change":
          textArea.appendText (text_so.data.msg + "\n");
          break;
      private function cleanName(e:FocusEvent): void
       chatName.text="";
      private function sendMsg(e:MouseEvent):void
       noName=(chatName.text=="<Enter Name>" || chatName.text=="");
       if (noName)
         textArea.appendText("You must enter your name \n");
       else
        text_so.setProperty("msg", chatName.text +": " + textInput.text);
        textArea.appendText (chatName.text +": "+textInput.text +"\n");
        textInput.text="";
      private function checkKey (e:ComponentEvent):void
       noName=(chatName.text=="<Enter Name>" || chatName.text=="");
       if (noName)
         textArea.appendText("You must enter your name \n");
       else
        text_so.setProperty("msg", chatName.text +": " + textInput.text);
        textArea.appendText (chatName.text +": "+textInput.text +"\n");
        textInput.text="";
      //Create NetStream instances
      private function checkConnect  (e:NetStatusEvent):void
       msg=e.info.code == "NetConnection.Connect.Success";
       if(msg)
        nsOut=new NetStream(nc);
        nsIn=new NetStream(nc);
        //NetStream
        nsOut.attachAudio(mic);
        nsOut.attachCamera(cam);
        nsOut.publish("camstream");
        nsIn.play("camstream");

    Hi Guys...
    I have found out what is wrong. I was importing the wrong package the correct one should have been:
    import fl.events.ComponentEvent;
    instead of
    import flash.events.ComponentEvent;
    I hope this is helpful for anyone caught in a simillar situation as me...Thanks..

  • HT1229 How do you transfer photos to external backup and keep the photos in events with event name or with description name. Each time I have tried to transfer them they only transfer with a jpg number so you don't know what photos are what.

    How do you transfer photos to external backup and keep the photos in events with event name or with description name. Each time I have tried to transfer them they only transfer with a jpg number so you don't know what photos are what. When you have several thousand photos it is difficult to determined what is what.
    Why does iPhoto have the ability to put photos in events and to give them descriptions if it doesn't transfer this info with the photo. I want to back my photos up to an external drive.

    The simplest way to achieve what you want is to back up the iPhoto Library. That will get everything.
    You sem to be exporting from iPhoto to the Finder. The Finder does not have the same organisation capabilities as iPhoto. If you're going to do that you need to understand some of the differences between the two.
    Event Name will become  Folder Name.
    'Description Name' I guess is the Title you give the Photo
    Jpeg Number is the File Name assigned by your camera.
    So: File -> Export
    Set your Kind to Jpeg
    Select your preferred Quality
    Check the Boxes at 'Titles and Descriptions' and Location Information
    Under FIlename select 'Use Title'
    Click on Export. In the Next Window choose a New Folder as your export destination and then Name that as you prefer
    Regards
    TD

  • How to Set A Default Start Time For New Events In Calendar?

    How to Set A Default Start Time For New Events In Calendar?

    John,
    Thanks for that suggestion - could not get it to work. However, I did manage a different approach. I finally determined the sequence of events in terms of how the various events and listeners fire (I think).
    Basically, the CalendarActivityListener fires, followed by the listener associated with the Calendar object's Create facet, followed finally by the CalendarEventListener - the final is where the TriggerEvent is available and then finally, control is passed to the popup/dialog in the Create facet. So, my approach of trying to set/get the TriggerDate in the user's HTTP session was doomed to failure because it was being get before it had been set :(
    Anyway, I ended up adding a bit of code to the CalendarEvent listener - it grabs the current BindingContext, navigates through the DCBindingContainer to derive an Iterator for the ViewObject which drives the calendar and then grabs the currently active row. I then do a few tests to make sure we're working with a "new" row because I don't want to alter start & end dates associated with an existing calendar entry and then I define the Start and End dates to be the Trigger Date.
    Works just fine. Snippet from the listener follows
    BindingContext bindingContext = BindingContext.getCurrent();+
    *if ( bindingContext != null )    {*+
    DCBindingContainer dcBindings = (DCBindingContainer) bindingContext.getCurrentBindingsEntry();+
    DCIteratorBinding iterator = dcBindings.findIteratorBinding("EventsView1Iterator");+
    Row currentRow = iterator.getCurrentRow();+
    if ( currentRow.getAttribute("StartDate") == null)+
    currentRow.setAttribute("StartDate", calendarEvent.getTriggerDate());+
    if (currentRow.getAttribute("EndDate")==null)+
    currentRow.setAttribute("EndDate", calendarEvent.getTriggerDate());+
    *}*

  • How do i get final cut pro x to recognize my time capsule in event library

    how do i get final cut pro x to recognize my time capsule in event library?

    Yeah I'm getting the same issue.  I purchased a new Mac Mini yesterday purely to use the new FCPX, and now on day 1 I'm already running into problems... please don't make me switch to Premiere.
    Set up the computer with external yesterday, never set anything to Time Machine.  Here's a screenshot of the drive, formatted on Mac OS Extended (Journaled):
    And here's a screenshot of FCPX not recognizing the drive:
    Apple please respond to this post, would really appreciate some help here troubleshooting. 

  • Time loop and events (again)

    Good morning,
    I still have problems with time loops and events.
    I have an event structure based on run time menu (two buttons: start stop).
    When I push start, an automatic sequence is started made of a state machine (so a while loop).
    I want to stop the process by means of presing stop in the run time menu. The problem is that the system doesn't respond when I press the button (it's not locked since I unchecked the option to stop front panel acitivity in the event structure configuration). I see that the pression of the stop command is made, but the code inside the event structure is not executed.
    How can I avoid this?
    Thank you,
    Fede

    Events don't react to changes in local and global varables, and that's usually a good thing.
    To trigger an event programmatically, you should write to a signaling property of the control assigned to the event, and the event will fire (even if the value does not actually change).
    Attached is a simple modification of my example that forces a stop of any ongoing measurments every 10 seconds using the above method.
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    Prova Loop MenuIII.zip ‏15 KB

  • ICal ichanges the time of the events with another time zone when sync

    I've changed my time zone in my iphone during a trip and when I came back, I reset my actual time zone, then, I syncronized it with my lap and they show different times for the same event.
    Events added directly in my iphone stay the same in it, but appear in another time in my computer, even though I have verified both of them have the same time zone. 
    Events added directly on my lap stay the same in it but appear wrong in my iphone.
    Thanks,

    Perhaps the answer in this thread will help:
    https://discussions.apple.com/message/7950396#7950396
    Understanding and Using Time Zone Support:
    http://support.apple.com/kb/HT4504

  • ICal changes times of my events based on Time Zone! Argh!

    This is so weird...
    I travel btwn NYC and LA, and if schedule an event on my iCal, either on the iPad, iPhone or MacBook Pro (all connected via MobileMe), when I change time zones, it changes the time of the event for that time zone. As opposed to keeping it at the correct time that it was actually scheduled at. For example, if I'm in New York City, and create an event for the following week that's taking place at 8pm, when I get to Los Angeles, it tells me the event is at 5pm.
    I leave all of my Apple products to Automatically Set Time based on location. Is there something else I should be doing here?
    Help!

    Go to settings, then Mail, Contacts, Calendar; then time zone support. Set your time zone.

  • Iphoto, pictures are shown several times in an event.

    What's happening if the same picture in iphoto is shown twice or more in an event? Are these pictures saved on the hard disk more than one time or are they just in this event shown several times. Is it sufficient if I'm blind out the double? Thanks

    I found one work-around, but I hope there's an easier way:
    1) Right clip on the corrupted clip, and select "reveal in finder",
    2) Duplicate the clip and drag the duplicate to the desktop
    3) Select File->Import->Movies...
    4) Navigate to the clip on the desktop, select "Add to existing event", select event, and click "Import"
    5) The clip will be inserted in the original event, just before the corrupted clip
    Eric

  • [svn:fx-trunk] 16143: Updating the length of the HierarchicalCollectionView in case of refresh event .

    Revision: 16143
    Revision: 16143
    Author:   [email protected]
    Date:     2010-05-17 04:05:14 -0700 (Mon, 17 May 2010)
    Log Message:
    Updating the length of the HierarchicalCollectionView in case of refresh event.
    QE notes: None
    Doc notes: None
    Bugs: http://bugs.adobe.com/jira/browse/FLEXDMV-2426
    Reviewer: Sreeni
    Tests run: checkintests
    Is noteworthy for integration: No
    Ticket Links:
        http://bugs.adobe.com/jira/browse/FLEXDMV-2426
    Modified Paths:
        flex/sdk/trunk/frameworks/projects/datavisualization/src/mx/collections/HierarchicalColle ctionView.as

  • How can I stop ical from deleting time information from event titles?

    I sometimes like to put times (e.g., 10pm) in the titles of my events.  I do this because I want to see the time in the event title for certain events.  Apple's ical thinks it knows what I want (it doesn't!) and deletes this information from the title, probably to schedule the event at that time, which is ridiculous because I sent the time of the event when I create it.  This is especially annoying because I want the time in the event title for a reason.  I can't figure out how to turn this function off.  Apple, if you're reading this, please add an easy on/off switch to this "feature," (or better yet, remove it).  In the meantime, does anyone know how to get around this?

    Enter them in a format that Calendar doesn’t recognize as a time.
    Or go back and edit the title after it recognizes the date/time info.

  • Calling the refresh event of a portlet

    Hi
    Can I call the refresh event of a portlet in another page when I refresh the
    current page?
    Any thoughts?
    Raghu

    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class WindowClosingTest extends JFrame {
         public WindowClosingTest() {
              try {
                   setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
                   JButton button = new JButton("Close");
                   button.addActionListener(new ActionListener() {
                        public void actionPerformed(ActionEvent ae) { performClose(); }
                   addWindowListener(new WindowAdapter() {
                        public void windowClosing(WindowEvent we) { performClose(); }
                   getContentPane().add(button);
                   pack();
                   setLocationRelativeTo(null);
                   setVisible(true);
              } catch (Exception e) { e.printStackTrace(); }
         private void performClose() {
              int n = JOptionPane.showConfirmDialog(null, "Close?", "Confirm", JOptionPane.YES_NO_OPTION);
              if (n != 1) { System.exit(0); }
         public static void main(String[] args) { new WindowClosingTest(); }
    }

  • Run-Time Menu and Event Structure~~HELP~~

    Hi, brothers,
    I'm new user for LabVIEW. Use the version of LabVIEW is 8.6
    One problem describe as below:
    Can Run-Time Menu and Event Structure exist simultaneously?
    Without Event Structure, Run-Time Menu works well, but Run-Time Menu works abnormally.after adding Event Structure,
    How do I modify the problem?
    Thank you for your help.
    Attached is the program.
    Attachments:
    PC_Adjustment.zip ‏44 KB

    Yes they can coexist, but not how you did it.
    Every iteration of the while loop you wait for an event in the event structure, and you look if the user has selected anything from the menu.
    To get this working you should add an event for <this VI>\Menu Selection (User):
    Ton
    PS you should add a stop button, the only way you can stop the VI is hitting the 'emergency stop' button, with hardware connected (like you have) this is not the adviced routine
    Message Edited by TonP on 09-26-2008 07:34 AM
    Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
    Nederlandse LabVIEW user groep www.lvug.nl
    My LabVIEW Ideas
    LabVIEW, programming like it should be!
    Attachments:
    Main_BD.png ‏5 KB

Maybe you are looking for

  • Sound card issues downgrading Pavilion dm1z to XP x64?

    A few months ago, while following the "Unofficial Downgrade to XP" guide, I decided to go with XP 64-bit for my Pavilion dm1z laptop. The thread does indicate that 64-bit XP isn't supported at all for newer HP laptops, but I wanted to still take adva

  • Return Delivery on PO Item History Screen

    Hello, please, does anyone know where the value of a "Return Delivery" comes from? I can find Confirmations values, Invoices, even if I need to bring from ECC (erp). But for "Return Delivery", I have searched in all the FM's and tables that I know, b

  • Application connection help in Jdev for ADF deployment

    Hi, I have installed OAS 10.1.3.1 in my local machine to test the ADF deployment. My application is in C: with jdev version 10.1.3.2 and the server is installed in C:\Product\10.1.3.1\OracleAS_1. Could you please guide me in creating the applciation

  • Error after upgrading to SP3

    I had the following code and it was working using the standard install of Crystal Reports 2008. ' pCrystalReport is a passed in CrystalDecisions.CrystalReports.Engine.ReportDocument object Dim objDatabaseTable As CrystalDecisions.CrystalReports.Engin

  • Updating 3.2.3 Vaults Using 3.5.1

    Hello, I am in the process of upgrading from OSX 10.6.8 to OSX 10.9.3 and from Aperture 3.2.3 to 3.5.1 (using managed library on an external drive) on an iMac and MacBook Pro.  I have two Aperture vaults on separate portable USB drives.  The first ti