Display timer in applet

does anyone have the source code for a timer which can be started, stepped, and stopped by clicking
the the associated buttons.

I dont have the stepped feature but i have one that does the similar job if u want it let me know; if u want me to mail it post ur email add.

Similar Messages

  • Timer in Applet - Source code available

    Hello,
    I have this timer class which works. How do I include it in an Applet so that my applet
    displays time?
    Thanks
    Mathew
    import java.util.*;
    public class TimeTest implements Runnable
         Calendar time;
         int hour, minute, second;
         Thread thread = null;
         public TimeTest()
              time = Calendar.getInstance();
              hour = time.get(Calendar.HOUR_OF_DAY);
              minute = time.get(Calendar.MINUTE);
              second = time.get(Calendar.SECOND);
              if(thread == null)
                   thread = new Thread(this);
                   thread.start();
         public void run()
              try
                   Thread t = Thread.currentThread();
                   while(thread == t)
                        thread.sleep(1000);
                             second++;
                        if(second > 59)
                             minute++;
                        if(minute>59)
                             hour++;
                        formatTime();
                   while(thread != t)
                        thread.suspend();
              catch(Exception e)
                   e.printStackTrace();
         public void formatTime()
              second = (second > 59? 0 : second);
              minute = (minute > 59? 0 : minute);
              hour = (hour > 23? 0 : hour);
              System.out.println(hour+":"+minute+":"+second);
         public static void main(String[] args)
              new TimeTest();
         public void stop()
              thread.stop();
    }

    How about this:
    import java.util.*;
    import java.text.*;
    import java.awt.event.*;
    public class Timer 
         javax.swing.Timer timer;
         SimpleDateFormat  timef = new SimpleDateFormat("HH:mm:ss");
    public Timer()
         timer = new javax.swing.Timer(1000, new ActionListener()
              public void actionPerformed(ActionEvent e)
                   String s = timef.format(new Date(System.currentTimeMillis()));
                   System.out.println(s);
         timer.start();
    public static void main (String[] args) 
         new Timer();
         while (true){}
    }

  • Using getter/setter for returing a string variable to display on an Applet

    have two classes called, class A and class testA.
    class A contains an instance variable called title and one getter & setter method. class A as follow.
    public class A extends Applet implements Runnable, KeyListener
         //Use setter and getter of the instance variable
         private String title;
         public void init()
              ASpriteFactory spriteFactory = ASpriteFactory.getSingleton();
              // Find the size of the screen .
              Dimension theDimension = getSize();
              width = theDimension.width;
              height = theDimension.height;
              //Create new ship
              ship = spriteFactory.createNewShip();
              fwdThruster = spriteFactory.createForwardThruster();
              revThruster = spriteFactory.createReverseThruster();
              ufo = spriteFactory.createUfo();
              missile = spriteFactory.createMissile();
              generateStars();
              generatePhotons();
              generateAsteroids();
              generateExplosions();
              initializeFonts();
              initializeGameData();
              //Example from Instructor
              //setMyControlPanel( new MyControlPanel(this) );
              // new for JDK 1.2.2
              addKeyListener(this);
              requestFocus();
         public void update(Graphics theGraphics)
              // Create the offscreen graphics context, if no good one exists.
              if (offGraphics == null || width != offDimension.width || height != offDimension.height)
                   // This better be the same as when the game was started
                   offDimension = getSize();
                   offImage = createImage(offDimension.width, offDimension.height);
                   offGraphics = offImage.getGraphics();
                   offGraphics.setFont(font);
              displayStars();
              displayPhotons();
              displayMissile();
              displayAsteroids();
              displayUfo();
              //displayShip();
              //Load the game with different color of the space ship          
              displayNewShip();
              displayExplosions();
              displayStatus();
              displayInfoScreen();
              // Copy the off screen buffer to the screen.
              theGraphics.drawImage(offImage, 0, 0, this);
         private void displayInfoScreen()
              String message;
              if (!playing)
                   offGraphics.setColor(Color.white);
                   offGraphics.drawString("\'A\' to Change Font Attribute", 25, 35);
                   offGraphics.drawString(getTitle(), (width - fontMetrics.stringWidth(message)) / 2, height / 2
                             - fontHeight);
                   message = "The Training Mission";
                   offGraphics.drawString(message, (width - fontMetrics.stringWidth(message)) / 2, height / 2);
                   message = "Name of Author";
                   offGraphics.drawString(message, (width - fontMetrics.stringWidth(message)) / 2, height / 2
                             + fontHeight);
                   message = "Original Copyright 1998-1999 by Mike Hall";
                   offGraphics.drawString(message, (width - fontMetrics.stringWidth(message)) / 2, height / 2
                             + (fontHeight * 2));
                   if (!loaded)
                        message = "Loading sounds...";
                        int barWidth = 4 * fontWidth + fontMetrics.stringWidth(message);
                        int barHeight = fontHeight;
                        int startX = (width - barWidth) / 2;
                        int startY = 3 * height / 4 - fontMetrics.getMaxAscent();
                        offGraphics.setColor(Color.black);
                        offGraphics.fillRect(startX, startY, barWidth, barHeight);
                        offGraphics.setColor(Color.gray);
                        if (clipTotal > 0)
                             offGraphics.fillRect(startX, startY, (barWidth * clipsLoaded / clipTotal), barHeight);
                        offGraphics.setColor(Color.white);
                        offGraphics.drawRect(startX, startY, barWidth, barHeight);
                        offGraphics
                                  .drawString(message, startX + 2 * fontWidth, startY + fontMetrics.getMaxAscent());
                   else
                        message = "Game Over";
                        offGraphics.drawString(message, (width - fontMetrics.stringWidth(message)) / 2, height / 4);
                        message = "'S' to Start";
                        offGraphics.drawString(message, (width - fontMetrics.stringWidth(message)) / 2, height / 4
                                  + fontHeight);
              else if (paused)
                   offGraphics.setColor(Color.white);
                   message = "Game Paused";
                   offGraphics.drawString(message, (width - fontMetrics.stringWidth(message)) / 2, height / 4);
         public String getTitle() {
              System.out.print(title);
              return title;
         public void setTitle(String title) {
              this.title = title;
    }displayInfoScreen method in class A calls out for getTitle( ) to be displayed on an applet as an initial display string for the application.
    The instance variable title is set by setTitle method which is called out in class testA as follow,
    public class testA extends TestCase
          * testASprite constructor comment.
          * @param name
          *          java.lang.String
         public testA(String name)
              super(name);
          * Insert the method's description here.
          * @param args
          *          java.lang.String[]
         public static void main(String[] args)
              junit.textui.TestRunner.run(suite());
              // need to figure out how to get rid of the frame in this test
              System.exit(0);
         public static Test suite()
              return new TestSuite(testA.class);
          * Basic create and simple checks
         public void testCreate()
              A theGame = new A();
              assertNotNull("game was null!", theGame);
          * Basic create and simple checks
         public void testInit()
              A theGame = new A();
              Frame gameFrame = new Frame("THE GAME");
              gameFrame.add(theGame);
              int width = 640;
              int height = 480;
              gameFrame.setSize(width, height);
              // must pack to get graphics peer
              gameFrame.pack();
              theGame.resize(width, height);
              theGame.setTitle("TEST THE GAME");
              theGame.init();
              assertEquals("ASprite width not set", A.width, width);
              gameFrame.dispose();
              gameFrame.remove(theGame);
    }Basically, class testA invokes the init( ) method in class A and start the applet application. However, it displays a white blank display. If I change the getTitle( ) in the displayInfoScreen method to a fixed string, it works fine. Did I forget anything as far as using getter & setter method? Do I have to specify some type of handle to sync between setter and getter between two classes? Any feedback will be greatly appreciated.
    Thanks.

    Your class A extends runnable which leads me to believe that this is a multi-threaded application. In that case, title may or may not be a shared variable. Who knows? It's impossible to tell from what you posted.
    Anyway, what is happening is that your applet is being painted by the JFrame before setTitle is called. After that, who knows what's happening. It's a complicated application. I suspect that if you called setTitle before you added the applet to the frame, it would work.

  • How do I display time remaining in a captivate published video so the learning can know how much time is remaining in a video

    After I publish my video it just plays but there is no indication of how much time is remaining on the video while watching. How do I display this

    It is possible, but you have to know 'time' is bit different, depending if you are talking about the 'editors' time or the real time spent by the the trainee. Have a look at this old blog post, that tries to explain:
    http://blog.lilybiri.com/display-time-information
    Time can show on the TOC (editors time), and if you have a playbar with a progress bar that gives some indication as well, but both for pure linear projects.

  • List view item display time is taking too much

    Hi,
         I am working in a sharepoint2013 project. In our project , list view item display time is taking too much in IE8 sp2013 64 bit environment. Can anyone help me to resolve this issue?
    Thanks,
    Nabhendu

    Hi Nabhendu,
     We had something similar with our SP2013 and IE8 32-bit. It seems that IE8 was in Compatible mode which make it IE7, which is unsupported by SP2013 due to HTML5.
    Issue : List view especially datasheet view which has been moved from ActiveX to HTML5 had very slow response on SP2013 and IE8 32-bit.
    Resolution : Try Chrome and see if its CSS/Masterpage or SP2013 issues performance issue.
    We deployed masterpage and css which was used in our SP2007 site with minor changes, but later we figured out that we need to make major changes in order to work with IE8 and SP2013.
    Try Indexing Columns.
    check how many look up columns are used.
    Hopefully that may help you..
    Thanks,
    Parth
    Thanks and Regards, Parth

  • How to get/display  time with minutes in a test item

    Dear experts,
    Forms [32 Bit] Version 10.1.2.0.2 (Production)
    Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
    Oracle Toolkit Version 10.1.2.0.2 (Production)
    PL/SQL Version 10.1.0.4.2 (Production)I've the following requirements.
    In my form, there are three text items and one save button.
    Text items named as
    No_of_days --> Number data type
    (user will enter number of days)
    hours_limit --> Char data type with format mask (HH:MI);
    (user will enter hours with minutes)
    Upto_date_time --> date data type;
    this field calculated as (No_of_days+hours_limit+sysdate)
    User will enter No_of_days or hours_limit:
    Based on the values I've to calculate Upto_date_time
    Here is the problem:
    1) If user doesn't enter hours_limit I want to show default time as " 04:00 PM"
    2) If user enter hours_limit field we should allow them to enter in the following format
    "HH24:MI" format;
    what whould be suitable data type for hours_limit field..
    I tried with char and i've set the format mask as ,
    set_item_property('BLOCK3.hours_limit',format_mask,'HH:MI');
    But I'm geeting the error
    "FRM-50027:Invalid format mask for given datatype"
    Please help to solve this problem,
    Regards,
    Karthi

    Hi vansul ,
    set_item_property('BLOCK3.hours_limit',format_mask,'HH:MI');
    Format mast is only allowed to date data type fields.If i set the hours_limit item's data type as date , I'm getting the error message "ORA-01843:Not a valid month"..
    How could i make this field only getting or display time with minutes?
    Regards,
    Karthi

  • I am trying to change the display time in Captivate 5...

    When I try to shorten the length of a slide either in properties or by clicking the end and dragging it, like in Captivate 4, it keeps going back to the original time.  Normally I record a demonstration and when I am done adding the effects and the voice I have to shorten or lengthen a slide, but I am unable to do this in CP5.  Please help.

    Hello,
    If the slide is longer than 3 sec you can change the 'Display time' in the Properties panel, General section too. But here you cannot get below 3 sec. Dragging in the timeline allows me to go below 3 sec, but you have first to shorten the timeline of the objects before you can change the duration of the slide. To be sure I just tried again and was able to get to a minimum time of 0.1 sec with that workflow. In the screenshot it is 0.3 sec. If you have FMR, video or audio however the duration of that object will be responsable for the duration of the slide.
    Hope it works for you too, cannot explain why it is not possible with the Properties panel, which will show correctly the duration after you changed it with the Timeline.
    Lilybiri

  • How to display FileDialog in applet?

    Hi all,
    I looked FileDialog constructors but only Frame can be the owner of the dialog? Is there a way to do display it in applet?
    Thank you.

    Try:
    JOptionPane.getFrameForComponent(this);
    Remember:
    Applets need to be signed to access the file system.

  • Display .gif In Applet Problem

    I have been making a game. Very simply, the game has a main class and another truely important class that extends JFrame, it is the map. In it i need to upload .gif files and display them. It worked up until recently because i needed to make a sepperate class. I know how to use the getImage() for Images and the the way for ImageIcons, but for some reason, they never display (they display just whiteness). My Code is as follows
    import java.awt.*;
    import java.awt.event.*;
    import java.util.*;
    import javax.swing.*;
    import java.io.*;
    // when this puppy reads from a file, it'll be able to have 55 15 x 15 terrains per row
    // 35 15 x 15 terrains per column
    // arrows by everythign that u would need to consider in finding the problem
    // this is not the main class
    public class GameMap extends JPanel implements MouseListener, MouseMotionListener, KeyListener{
         public static final int MAX_BULLETS = 200;
         public static final int MAX_PLAYERS = 50;
         public static final int SPLAT_SIZE = 15;
         public static final int PLAYER_SIZE = 15;
         public static final int MAX_MESSAGES = 10;
         public static final int ROBOT_SIZE = 15;
         private static final int rowTerrains = 35;
         private static final int columnTerrains = 55;
         private static int currentBullets = 0;
         private static int currentPlayers = 0;
         private static int bulletRotation = 0;
         private static int aimX, aimY;
         private boolean mapLoaded;
         private boolean writingMessage;
         private boolean imagesLoaded;
         private int messageRotation;
         private int tileCoord;
         private String messageText = "";
         private String currentMap;
        private Bullet bullet[] = new Bullet[MAX_BULLETS];
        private Player player[] = new Player[MAX_PLAYERS];
        private Message message[] = new Message[MAX_MESSAGES];
        private Color backgroundColor = new Color(81, 141, 23);
        private Image offscreenMap; // offscreen image of map
        private Graphics mapGraphics;
         private ImageIcon yellowSplat1, yellowSplat2, yellowSplat3, yellowSplat4, yellowSplat5, bluePlayerBack, bluePlayerFront, bluePlayerRight, bluePlayerLeft, grass, tree, mountain, robot1;
         private Terrain terrain[] = new Terrain[(rowTerrains * columnTerrains)];
         public GameMap(){
              this(800, 450);
         public GameMap(int width, int height){
              addMouseListener(this);
              addMouseMotionListener(this);
              addKeyListener(this); // use method requestFocusInWindow() for this to work
              setPreferredSize(new Dimension(width, height));
              setBackground(backgroundColor);
              for (int x = 0; x < bullet.length; x++){
                   bullet[x] = new Bullet();
              for (int x = 0; x < player.length; x++){
                   player[x] = new Player();
              for (int x = 0; x < message.length; x++){
                   message[x] = new Message();
              for (int x = 0, currentX = 0, currentY = 0; x < (rowTerrains * columnTerrains); x++){
                   terrain[x] = new Terrain();
                   terrain[x].setX(currentX);
                   terrain[x].setY(currentY);
                   currentX += 15;
                   if (currentX > columnTerrains * 15){
                        currentX = 0;
                        currentY += 15;
              player[0].drawPlayer(0, 0);
              //loadMap("Map1.txt"); // this is called to load the map right when this object is initialized
         public void paintComponent(Graphics g){
              super.paintComponent(g);
              Graphics2D g2d = (Graphics2D)g;
              Composite originalComposite = g2d.getComposite();
              if (imagesLoaded == false){
                   yellowSplat1 = new ImageIcon("yellow1.gif");
                   yellowSplat2 = new ImageIcon("yellow2.gif");
                   yellowSplat3 = new ImageIcon("yellow3.gif");
                   yellowSplat4 = new ImageIcon("yellow4.gif");
                   yellowSplat5 = new ImageIcon("yellow5.gif");
                   bluePlayerBack = new ImageIcon("BlueBack.gif");
                   bluePlayerFront = new ImageIcon("BlueFront.gif");
                   bluePlayerLeft = new ImageIcon("BlueLeft.gif");
                   bluePlayerRight = new ImageIcon("BlueRight.gif");
                   grass = new ImageIcon("Grass.gif");
                   tree = new ImageIcon("Tree.gif");
                   mountain = new ImageIcon("Mountain.gif");
                   robot1 = new ImageIcon("Robot1.gif");
              if (mapLoaded == false){ // so a map is loaded when game is started
                   loadMap("Map1.txt");
                   mapLoaded = true;
              g.drawImage(offscreenMap, 0, 0, this);
              for (int x = 0; x < bullet[0].totalBullets; x++){
                   if (bullet[x].getArrived()){
                        //find splat type and display it
                        g2d.setComposite(makeComposite(0.5f));
                        switch (bullet[x].getSplatType()){
                             case 0:
                                  yellowSplat1.paintIcon(this, g2d, bullet[x].getDestX() - SPLAT_SIZE / 2, bullet[x].getDestY() - SPLAT_SIZE / 2);
                                  break;
                             case 1:
                                  yellowSplat2.paintIcon(this, g2d, bullet[x].getDestX() - SPLAT_SIZE / 2, bullet[x].getDestY() - SPLAT_SIZE / 2);
                                  break;
                             case 2:
                                  yellowSplat3.paintIcon(this, g2d, bullet[x].getDestX() - SPLAT_SIZE / 2, bullet[x].getDestY() - SPLAT_SIZE / 2);
                                  break;
                             case 3:
                                  yellowSplat4.paintIcon(this, g2d, bullet[x].getDestX() - SPLAT_SIZE / 2, bullet[x].getDestY() - SPLAT_SIZE / 2);
                                  break;
                             case 4:
                                  yellowSplat5.paintIcon(this, g2d, bullet[x].getDestX() - SPLAT_SIZE / 2, bullet[x].getDestY() - SPLAT_SIZE / 2);
                                  break;
                   else{
                        g2d.setComposite(originalComposite);
                        g2d.setColor(Color.yellow);
                        g2d.fillOval(bullet[x].getX(), bullet[x].getY(), 3, 3);
              g2d.setComposite(originalComposite);
              g.setColor(Color.yellow);
              for (int x = 0; x < player[0].totalPlayers; x++){
                   if (player[x].getPlayerPosition().equals("Back")){
                        bluePlayerBack.paintIcon(this, g2d, player[x].getX(), player[x].getY());
                   else if (player[x].getPlayerPosition().equals("Right")){
                        bluePlayerRight.paintIcon(this, g2d, player[x].getX(), player[x].getY());
                   else if (player[x].getPlayerPosition().equals("Left")){
                        bluePlayerLeft.paintIcon(this, g2d, player[x].getX(), player[x].getY());
                   else if (player[x].getPlayerPosition().equals("Front")){
                        bluePlayerFront.paintIcon(this, g2d, player[x].getX(), player[x].getY());
                   else{
                        g2d.fillOval(player[x].getX(), player[x].getY(), 15, 15);
              if (writingMessage){
                   g2d.setColor(new Color(0, 0, 130));
                   g2d.setComposite(makeComposite(0.5f));
                   g2d.draw3DRect(8, 7, 800, 17, true);
                   g2d.setComposite(originalComposite);
                   g2d.setColor(Color.yellow);
                   g2d.drawString(messageText, message[0].getX(), 20);
              for (int x = 0; x < MAX_MESSAGES; x++){
                   if (message[x].isDisplayed()){
                        g2d.drawString(message[x].getMessage(), message[x].getX(), message[x].getY());
         private AlphaComposite makeComposite(float alpha) {
              int type = AlphaComposite.SRC_OVER;
              return(AlphaComposite.getInstance(type, alpha));
         public void drawBullet(int aimX, int aimY){
              bullet[bulletRotation].drawBullet(player[0].getX() + PLAYER_SIZE / 2, player[0].getY() + PLAYER_SIZE / 2, aimX, aimY);
              player[0].setPlayerPosition(bullet[bulletRotation].getPlayerPosition());
              bulletRotation++;
              if (bulletRotation >= MAX_BULLETS){
                   bulletRotation = 0;
         public void loadMap(String map){
              mapLoaded = false;
              currentMap = map;
              try{
                   BufferedReader in = new BufferedReader(new FileReader(map));
                   String input, string1, string2;
                   for (int x = 0; x < terrain.length; x++){
                        terrain[x].setFilled(false);
                   for (int x = 0, currentArray; x < terrain.length; x++){
                        if ((input = in.readLine()) != null) {
                             StringTokenizer st = new StringTokenizer(input);
                             currentArray = Integer.parseInt(st.nextToken());
                             terrain[currentArray].setTerrainType(st.nextToken());
                             terrain[currentArray].setFilled(true);
                        else{
                             break;
                   in.close();
                   offscreenMap = createImage(size().width, size().height);
                   mapGraphics = offscreenMap.getGraphics();
                   //mapGraphics.clearRect(0, 0, size().width, size().height);
                   // everything from here down is to be painted to mapGraphics... but it doesn't get this far cuz of an error
                   for (int x = 0; x < terrain.length; x++){
                        if (terrain[x].getTerrainType().equals("Grass")){
                             grass.paintIcon(this, mapGraphics, terrain[x].getX(), terrain[x].getY());
                             System.out.println("terrain(" + x + ") is Grass");
                        else if (terrain[x].getTerrainType().equals("Tree")){
                             tree.paintIcon(this, mapGraphics, terrain[x].getX(), terrain[x].getY());
                             System.out.println("terrain(" + x + ") is Tree");
                        else if (terrain[x].getTerrainType().equals("Mountain")){
                             mountain.paintIcon(this, mapGraphics, terrain[x].getX(), terrain[x].getY());
                             System.out.println("terrain(" + x + ") is Mountain");
              catch (FileNotFoundException e){
                   System.out.println("Map not found");
              catch (IOException e){
                   System.out.println("IOException Error!");
              // **** mouse Listener ****//
         public void mouseClicked(MouseEvent e){}
         public void mousePressed(MouseEvent e){}
         public void mouseReleased(MouseEvent e){
              if (e.getButton() == 1){
                   //System.out.println("player[0].movePlayer(" + e.getX() + ", " + e.getY() + ")");
                   aimX = e.getX();
                   aimY = e.getY();
                   movePlayer(aimX, aimY);
              else if (e.getButton() == 3){
                   aimX = e.getX();
                   aimY = e.getY();
                   drawBullet(aimX, aimY);
         public void mouseEntered(MouseEvent e){
              if (isFocusOwner() != true){
                   requestFocusInWindow();
         public void mouseExited(MouseEvent e){}
         // **** end mouse listener ****//
         // **** mouse motion listener ****//
         public void mouseDragged(MouseEvent e){}
         public void mouseMoved(MouseEvent e){}
         // **** end mouse motion listener ****/
         public void keyPressed(KeyEvent e){}
         public void keyReleased(KeyEvent e){}
         public void keyTyped(KeyEvent e){}
    }I removed a few unnecessary methods from this code to make it easier to view. EVERYTHING works except for the images displaying. The reason i'm having this problem now is i just redid my workspace and copied the code and i think some glitch stopped it from compiling correctly all along so now i experience this problem in the applet viewer. Though, even before, i couldn't get anything to display in an applet.
    And yes, everything is in the same place as the html file.
    Thanks for your help!

    Here's a way to keep track of and paint images with a simple Rectangle array. And also a way to remove lengthy initialization code blocks from paintComponent. Move the images by moving the rectangles.
    import java.awt.*;
    import java.awt.event.*;
    import java.io.*;
    import java.net.*;
    import javax.imageio.ImageIO;
    import javax.swing.*;
    public class GameMapRx
        public static void main(String[] args)
            JFrame f = new JFrame();
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            f.getContentPane().add(new GameMapPanel());
            f.setSize(400,400);
            f.setLocation(200,200);
            f.setVisible(true);
    class GameMapPanel extends JPanel
        Image[] images;
        Rectangle[] rects;
        boolean firstTime;
        final int PAD;
        public GameMapPanel()
            loadImages();
            firstTime = true;
            PAD = 20;
        protected void paintComponent(Graphics g)
            super.paintComponent(g);
            Graphics2D g2 = (Graphics2D)g;
            int w = getWidth();
            int h = getHeight();
            if(firstTime)
                initializeGameMap(w, h);
            for(int i = 0; i < rects.length; i++)
                Rectangle r = rects;
    g.drawImage(images[i], r.x, r.y, this);
    g2.draw(r);
    private void loadImages()
    String path = "images/duke/";
    String ext = ".gif";
    images = new Image[10];
    for(int i = 0; i < images.length; i++)
    try
    URL url = getClass().getResource(path + "T" + (i + 1) + ext);
    images[i] = ImageIO.read(url);
    catch(MalformedURLException mue)
    System.out.println("Bad URL: " + mue.getMessage());
    catch(IOException ioe)
    System.out.println("Unable to read: " + ioe.getMessage());
    private void initializeGameMap(int w, int h)
    rects = new Rectangle[images.length];
    int imageWidth = images[0].getWidth(this);
    int imageHeight = images[0].getHeight(this);
    int cols = (w - 2*PAD) / imageWidth;
    int xInc = imageWidth + (w - cols * imageWidth) / (cols + 1);
    int x0 = (w - cols * imageWidth -
    (cols - 1) * ((w - cols * imageWidth) / (cols + 1))) / 2;
    for(int i = 0; i < images.length; i++)
    int x = x0 + xInc * (i % cols);
    int rows = i / cols;
    int y = PAD + (imageHeight + PAD) * rows;
    rects[i] = new Rectangle(x, y, imageWidth, imageHeight);
    firstTime = false;

  • Nokia N9 on Standby Mode Displaying Time

    My N9 is displaying time on the standby mode. Is there a way to switch off this feature.
    Thanks
    Solved!
    Go to Solution.

    Turn it off in menu->settings->device->display/screen-> wait/standby mode. Sorry for the bad translation. I don't bother to turn on english as it needs a reboot

  • Apple TV on display times out

    Apple TV display times out after a period of time.

    Hi TonyWash,
    Welcome to the Support Communities!
    Is the Apple TV timing out while you are Home Sharing, using Airplay with a device, or working directly from the Apple TV menu?  Without knowing the specifics, I'll provide some basic troubleshooting for your Apple TV:
    One of the first troubleshooting steps is on Page 26 of the Apple TV User Guide:
    manuals.info.apple.com/MANUALS/1000/MA1607/en_US/apple_tv_3rd_gen_setup.pdf
    Try resetting your equipment by disconnecting Apple TV, your TV, your wireless networking equipment or base station, and your router
    from the power outlet. Wait 30 seconds, and then reconnect everything.
    Additional troubleshooting steps can be found here:
    Apple TV (2nd and 3rd generation): Troubleshooting Wi-Fi networks and connections
    http://support.apple.com/kb/TS4546
    I hope this information helps ....
    - Judy

  • HT1199 Menu bar will not display time

    My menu wsuddenly no longer displys time and other things on the top right of the menu bar. I have gone in and reset time and even locked it but still does not display time and is then unlocked when I return to try again.
    Help!

    Hello Riley,
    Apple Menu Bar Icons Gone...
    Safe Boot from the HD, (holding Shift key down at bootup), run Disk Utility in Applications>Utilities, then highlight your drive, click on Repair Permissions.
    PS. Safe boot may stay on the gray radian for a long time, let it go, it's trying to repair the Hard Drive
    You've probably got a couple of corrupt preference files.
    Move these files to the Desktop for now...
    /Users/<yourname>/Library/Preferences/com.apple.systempreferences.plist
    /Users/<yourname>/Library/Preferences>com.apple.systemuiserver.plist
    /Users/<yourname>/Library/Preferences/ByHost>com.apple.systemuiserver.xxx.plist
    where 'xxx' is a 12 digit (hexadecimal) numeric string.
    Reboot.
    This will reset your Menu Bar to the default, you'll need to go through System Preferences to reset the ones you need. (If they are already checked, uncheck them first and then recheck them).

  • Can Web Intelligence display time in 24-hour clock format?

    I would appreciate your kind help in answering this question:  How can I change the time format in a formula so as to display time in the 24-hour clock format?
              Presently the CurrentTime() value format looks like this  :  02:26:25 PM GMT-04:00
              Instead, I want it displayed in the 24-hour clock format like this  :  14:26
    I'm developing Web Intelligence reports in the BusinessObjects Enterprise XI 3.2 InfoView environment.
    I searched several places for an answer to this question, but had no luck.
    I searched the BusinessObjects Enterprise InfoView online help document (i.e., Web Intelligence Java Report Panel); I also searched two web sites: the Experts-Exchange website, and the BOB www.forumtopics.com website.
    I figured out that there is built in conversion function FormatDate() that can convert a date value into a text value, as for example :  FormatDate( CurrentDate(); "mmmm dd, yyyy" )
    However, I have not found an equivalent time function that would convert a time value into a text value of a specified format.
    Edited by: OSoccer on Jul 7, 2010 9:05 PM
    Edited by: OSoccer on Jul 7, 2010 9:06 PM
    Edited by: OSoccer on Jul 7, 2010 9:08 PM

    Anil,
         Perfect;  you answered my question!
         The only thing that I had to do differently was to leave off the quote marks from the string "HH:mm:ss" when I entered it into the Custom Date/Time box of the Number Format dialog window.
         While on this subject of the Number Format dialog window, I saw that the Date/Time box already held the following string value:
                    FULL_DATE
         So, thinking that I should leave that value alone, I entered the string "HH:mm:ss" in the box labeled "Undefined" next to the Date/Time box, instead.  That didn't work.  It just caused the webi report to display the CurrentTime() value as a long date, like this:
                   Friday, July 9, 2010
         So then I replaced the string "FULL_DATE" (without the quotes) with the string "HH:mm:ss" (first with and then without the quotes).  In the first try, the report displayed the time as "14:20:34"; in the second try, the report displayed the time as 14:20:34.
         Questions:
         Can you please tell me:
         1. What is the meaning and usage of the label FULL_DATE?
         2. In my attempts to get the time formatted the way I wanted it to look, I filled the Properties list (of the Number Format dialog window) with junk labels such as those listed below.  How can I delete these labels?
                   FULL_DATE; "HH:mm:ss"
                   FULL_DATE
                   FULL_DATE
                   FULL_DATE; "HH:mm:ss"
         3. What is the purpose of the box labeled "Undefined" next to the Date/Time box?

  • C3 - display time when key lock is on

    It's not mentioned in the manual, but if the keyboard lock is active, you have to push the Power button to display the date/time. Any other key displays the keyboard unlock hint.
    Nokia Lumia 520 3046.0000.1329.2001 RM-914
    Nokia Asha 302 V15.09 22-05-13 RM-813

    i have the same problem too..
     i saw my friends Nokia C3 can display time when keypad lock..
    how can i set it?
    i hope that someone will help me and others
    thank you in advance

  • Display times for "action objects"

    I work on a MacBook Pro, MaxOSX 10.7.5, Captivate 6.
    I need to hide a button that we have made as part of a "overlay" GUI - a form of CSS. We created a master project and coded it to be downloaded to all our other projects as a overall GUI.
    But in some projects I'd like to hide a single button - not to be able to press. Not through the whole project but after let's say three to five slides. I tried using a simple smartshape but the hidden area can still be clicked. Using clickboxes or button allow me to over ride the "CSS-button" but they have a major flaw: they only last the rest of the slide and I'd like to have them throughout the entire project.
    Copy-paste is NOT an option in this case - the project lenghts are vast ...
    Is there a clickbox, button, other object or advanced action that could make an "action object" to be displayed throughout the entire project?
    Or is there a widget och well trimmed programmer out there that could solve this?
    Very grateful for all good tips and answers!
    /Cheers!

    Hi,
    Thank you for the welcoming seems like a good forum
    to hang out in and learn new things!
    I guess I wasn't as clear as I should when describing
    my issue.
    In our work we have made a "Master Project" to function
    as a sort of CSS (Cascade Style Sheet) - just like you did in
    former web design.
    The Master Project functions roughly as a Master Slide
    but it has some benefits that a Master Slide isn't capable of.
    We use the Master Project to export our interface to
    all the other projects within the e-learning project.
    So instead of having to make changes in the Master Slide
    in every project we have a better control of GUI
    changes affecting the overall e-learning project.
    Your links have given us a great tool to work with!
    We have completely missed the possibility to convert
    a smartshape to a button and with that making it
    posible to be displayed throughout the project.
    Many thanks for those tips!
    All the best and a happy week-end!
    /Patrik
    Från:  Lilybiri <[email protected]>
    Svara till:  <[email protected]>
    Datum:  torsdag 7 mars 2013 14:09
    Till:  Patrik Lögdqvist <[email protected]>
    Ämne:  Display times for "action objects"
    Re: Display times for "action objects"
    created by Lilybiri <http://forums.adobe.com/people/Lilybiri>  in Advanced
    Adobe Captivate Users - View the full discussion
    <http://forums.adobe.com/message/5128986#5128986>
    Hello and welcome to the forum, But I don't understand your question very
    well. Perhaps it is only a matter of terminology. What do you mean by 'Master
    Project'? Is that a template, in which you have a custom theme, perhaps some
    advanced actions, variables, and of course master slides? You need interactive
    objects on all or a lot of slides, correct? I have been blogging a lot about
    the shape buttons, only interactive objects that allow that. Even did a
    webinar about them for Adobe. Here are some
    links:http://lilybiri.posterous.com/why-i-like-shape-buttons-captivate-6http:/
    /lilybiri.posterous.com/toggle-shape-buttonshttp://lilybiri.posterous.com/want
    -a-button-on-question-slide-in-capti vate
    <http://lilybiri.posterous.com/want-a-button-on-question-slide-in-captivate>
    http://blogs.adobe.com/captivate/2012/09/training-lilybiris-favourite-
    shapes-to-trigger-advanced-actions.html
    <http://blogs.adobe.com/captivate/2012/09/training-lilybiris-favourite-shapes-
    to-trigger-advanced-actions.html>  If you want control over the visibility of
    such a shape button, do not put them on a master slide, but time them for the
    rest of the project, starting with the slide where they should appear for the
    first time. Reason is that objects on master slides do not have an ID, which
    means that they cannot be hidden or disabled using a (advanced) action.
    Lilybiri
    Please note that the Adobe Forums do not accept email attachments. If you want
    to embed a screen image in your message please visit the thread in the forum
    to embed the image at http://forums.adobe.com/message/5128986#5128986 Replies
    to this message go to everyone subscribed to this thread, not directly to the
    person who posted the message. To post a reply, either reply to this email or
    visit the message page: http://forums.adobe.com/message/5128986#5128986 To
    unsubscribe from this thread, please visit the message page at
    http://forums.adobe.com/message/5128986#5128986. In the Actions box on the
    right, click the Stop Email Notifications link. Start a new discussion in
    Advanced Adobe Captivate Users by email
    <mailto:[email protected]il.fo
    rums.adobe.com>  or at Adobe Community
    <http://forums.adobe.com/choose-container!input.jspa?contentType=1&containerTy
    pe=14&container=2268>  For more information about maintaining your forum email
    notifications please go to http://forums.adobe.com/message/2936746#2936746.

Maybe you are looking for

  • Problem with my X7-00 display

    Hi guys, I have big problem with my X7-00 display... like it has been magnetized, but I'm not sure is that even possible. It is discolored, like on old CRT television displays. Any ideas?

  • Date Prompt in Direct DB Request

    Hi I have to pass the below filter in Direct Database Request but when I do as Filter in Report its working good T522452.ORDERED_DATE =EVALUATE('TO_DATE(%1,%2)', '@{Date1}','MM/DD/YYYY HH:MI:SS AM') but when I give the same sql in Direct db request i

  • How to create rollover text on an image

    I'm a non-coder I'm using Dreamweaver CS4 to create a personal website.  I know next to nothing about CSS, but I think I understand how to create a style and apply it to elements.  My website has several image galleries, and what I'd like to be able

  • Changing the homepage of 150 Macintosh's remotely?

    I need to change the homepage of about 150 macintosh's, running snow leopard. I am hoping to accomplish remotely, either with a Unix command or pushing the corrected plist to them. == User Agent == Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_4; en

  • How can I make "mail" my default email app?

    When I click on an email address from Cobook or on a web page viewed in Safari, the chrome app opens to a gmail account that I rarely use. How can I make my regular Mail app the default? Thanks.