Results 1 to 7 of 7
  1. #1
    alllks is offline Member
    Join Date
    May 2012
    Posts
    7
    Rep Power
    0

    Question Countdown Program Help!

    I am not new to the programming, nor to the Java programming,

    but I'm not really sure how to "construct" a countdown program.

    This isn't really for the "New To Java".. but, anyways.

    The goal is, when I open the program a small frame comes and

    counts down the days left to an already programmed date(for

    example 20 june, the end of the school days!)

    and displays them to the user on the small frame.

    Some tips, maybe?

    Also, I am aware how to use the calendar.DATE; calendar.DAY_OF_MONTH and calendar.MONTH.

    Thanks,

    --Alexander

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,458
    Rep Power
    20

    Default Re: Countdown Program Help!

    Quote Originally Posted by alllks View Post
    when I open the program a small frame comes
    Swing? AWT? SWT? JavaFX? Something else?

    First decide on your GUI toolkit. Then find a tutorial (there are good tutorials for Swing and JavaFX; don't choose the rather obsolete AWT) and learn how to build a GUI.

    Once you know that, try to learn and apply at least some of the principles of MVC (Model-View-Controller) architecture.

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  3. #3
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,224
    Rep Power
    20

    Default Re: Countdown Program Help!

    Have you got the code that calculates days?
    That's where I'd start.
    Then, presuming you wrote it as a method returning a value, you can just plug that into whatever front end you choose.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  4. #4
    alllks is offline Member
    Join Date
    May 2012
    Posts
    7
    Rep Power
    0

    Default Re: Countdown Program Help!

    Quote Originally Posted by Tolls View Post
    Have you got the code that calculates days
    s?
    That's where I'd start.
    Then, presuming you wrote it as a method returning a value, you can just plug that into whatever front end you choose.[/QUOTE]

    First, the GUI (.. and by the way I think swing's the best option right now..) is not really important right now.

    The WAY to implement the core counting (Maybe using calendar) is the prob'. I think everyone will agree, that the GUI will be easily done,

    there are many ways to construct a GUI in Java and hook it to other part of the program.

    REAL problem, as already stated is
    Quote Originally Posted by Tolls View Post
    the code that calculates the days
    s?.

    I think.. I can just use calendar.DATE_OF_MONTH and calendar.MONTH and some simple substraction.. I'll experiment.

    --Also, DarilBurke, thanks for your help but, there is one REALLY important thing in the java programming :

    Never mix the GUI with the other processes.
    Last edited by alllks; 05-22-2012 at 08:07 PM.

  5. #5
    alllks is offline Member
    Join Date
    May 2012
    Posts
    7
    Rep Power
    0

    Default Re: Countdown Program Help!

    Again, I would like to thank for the fast answers.

  6. #6
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,224
    Rep Power
    20

    Default Re: Countdown Program Help!

    Without code, it'll be hard for us to point out where your problem lies (even if it's simply pseudo code).
    Having code gives us a chance to see where you think you should be going with the problem, otherwise all we would be able to do is write it for you, which I'm sure isn't your aim.

    ETA: Oh, and no need to be quite so shouty...:)
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  7. #7
    alllks is offline Member
    Join Date
    May 2012
    Posts
    7
    Rep Power
    0

    Default Re: Countdown Program Help!

    Anyways, I'm really sorry about forgetting this thread.

    I'll just post the solution shortly(I'm using my phone now!), so anyone looking here can benefit(and so he/she doesn't have to go through the same..).

Similar Threads

  1. Java Countdown Timer
    By JayB in forum New To Java
    Replies: 2
    Last Post: 05-12-2011, 04:17 AM
  2. 10 seconds countdown on console
    By eLancaster in forum New To Java
    Replies: 4
    Last Post: 04-08-2011, 07:46 PM
  3. writing a countdown using java
    By stevie171 in forum New To Java
    Replies: 7
    Last Post: 12-01-2010, 05:52 PM
  4. countdown timer, little help with method
    By sidy in forum New To Java
    Replies: 22
    Last Post: 07-19-2008, 01:42 PM
  5. CountDown timer
    By Seema Sharma in forum AWT / Swing
    Replies: 1
    Last Post: 03-06-2008, 05:26 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •