Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 7 of 7

Thread: Need a calandar app done asap

  1. #1
    Junior Member
    Join Date
    Jun 2010
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Need a calandar app done asap

    This is what i need :

    A calendar which memorizes dates (in an external file) and when the program is open on one of those dates it displays an image or plays a sound. For example if itís open on a birthday it plays a song. I also need it to tell me about upcoming events a week ahead.

    Ive already made the gui for it, but i need it completed. I'm willing to pay 75 euros for it, but i just need it done really fast, if youre interested pm me, i can pay by western union


  2. #2
    mmm.. coffee JavaPF's Avatar
    Join Date
    May 2008
    Location
    United Kingdom
    Posts
    3,336
    My Mood
    Mellow
    Thanks
    258
    Thanked 286 Times in 225 Posts
    Blog Entries
    4

    Default Re: Need a calandar app done asap

    Hello gixmo,

    If you need this done urgently, it may be worth clicking the LIVE SUPPORT link at the top of the forums. There are people there who can help you instantly.

    How fast does this need to be done? Do you have a paypal account?
    Please use [highlight=Java] code [/highlight] tags when posting your code.
    Forum Tip: Add to peoples reputation by clicking the button on their useful posts.

    Looking for a Java job? Visit - Java Programming Careers

  3. #3
    Junior Member
    Join Date
    Jun 2010
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Need a calandar app done asap

    I tried the live support, but they use paypal and for some reason paypal wont take my credit card,
    no i dont have a pp account theyre unavailable in my country

    i need it for tomorrow

  4. #4
    mmm.. coffee JavaPF's Avatar
    Join Date
    May 2008
    Location
    United Kingdom
    Posts
    3,336
    My Mood
    Mellow
    Thanks
    258
    Thanked 286 Times in 225 Posts
    Blog Entries
    4

    Default Re: Need a calandar app done asap

    Quote Originally Posted by gixmo View Post
    I tried the live support, but they use paypal and for some reason paypal wont take my credit card,
    no i dont have a pp account theyre unavailable in my country

    i need it for tomorrow
    Ah OK. That could prove a problem for you then. I would attempt to help but I just don't have the time.

    Why have you left it so late? If you approached this sooner, i'm sure our members could of helped you complete it for free.

    If I get chance I will PM you.
    Please use [highlight=Java] code [/highlight] tags when posting your code.
    Forum Tip: Add to peoples reputation by clicking the button on their useful posts.

    Looking for a Java job? Visit - Java Programming Careers

  5. #5
    mmm.. coffee JavaPF's Avatar
    Join Date
    May 2008
    Location
    United Kingdom
    Posts
    3,336
    My Mood
    Mellow
    Thanks
    258
    Thanked 286 Times in 225 Posts
    Blog Entries
    4

    Default Re: Need a calandar app done asap

    Also, if your code is not too large, please post your GUI code within the code tags. (see my signature)
    Please use [highlight=Java] code [/highlight] tags when posting your code.
    Forum Tip: Add to peoples reputation by clicking the button on their useful posts.

    Looking for a Java job? Visit - Java Programming Careers

  6. #6
    Junior Member
    Join Date
    Jun 2010
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Need a calandar app done asap

    This is what ive done till now,

     
     
     
    import java.awt.BorderLayout;
    import java.awt.Color;
    import java.awt.Component;
    import java.awt.Container;
    import java.awt.FlowLayout;
    import java.awt.GridLayout;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.util.Calendar;
    import java.util.GregorianCalendar;
    import javax.swing.BorderFactory;
    import javax.swing.JButton;
    import javax.swing.JComboBox;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    public class Cal extends JPanel {
    protected int yy;
    protected int mm, dd;
    protected JButton labs[][];
    protected int leadGap = 0;
    Calendar calendar = new GregorianCalendar();
    protected final int thisYear = calendar.get(Calendar.YEAR);
    protected final int thisMonth = calendar.get(Calendar.MONTH);
    private JButton b0;
    private JComboBox monthChoice;
    private JComboBox yearChoice;
    Cal() {
    super();
    setYYMMDD(calendar.get(Calendar.YEAR), calendar.get(Calendar.MONTH),
    calendar.get(Calendar.DAY_OF_MONTH));
    buildGUI();
    recompute();
    }
    Cal(int year, int month, int today) {
    super();
    setYYMMDD(year, month, today);
    buildGUI();
    recompute();
    }
    private void setYYMMDD(int year, int month, int today) {
    yy = year;
    mm = month;
    dd = today;
    }
    String[] months = { "January", "February", "March", "April", "May", "June",
    "July", "August", "September", "October", "November", "December" };
    private void buildGUI() {
    getAccessibleContext().setAccessibleDescription(
    "Calendar not accessible yet. Sorry!");
    setBorder(BorderFactory.createEtchedBorder());
    setLayout(new BorderLayout());
    JPanel tp = new JPanel();
    tp.add(monthChoice = new JComboBox());
    for (int i = 0; i < months.length; i++)
    monthChoice.addItem(months[i]);
    monthChoice.setSelectedItem(months[mm]);
    monthChoice.addActionListener(new ActionListener() {
    public void actionPerformed(ActionEvent ae) {
    int i = monthChoice.getSelectedIndex();
    if (i >= 0) {
    mm = i;
    recompute();
    }
    }
    });
    monthChoice.getAccessibleContext().setAccessibleName("Months");
    monthChoice.getAccessibleContext().setAccessibleDescription(
    "Choose a month of the year");
    tp.add(yearChoice = new JComboBox());
    yearChoice.setEditable(true);
    for (int i = yy - 5; i < yy + 5; i++)
    yearChoice.addItem(Integer.toString(i));
    yearChoice.setSelectedItem(Integer.toString(yy));
    yearChoice.addActionListener(new ActionListener() {
    public void actionPerformed(ActionEvent ae) {
    int i = yearChoice.getSelectedIndex();
    if (i >= 0) {
    yy = Integer.parseInt(yearChoice.getSelectedItem()
    .toString());
    // System.out.println("Year=" + yy);
    recompute();
    }
    }
    });
    add(BorderLayout.CENTER, tp);
    JPanel bp = new JPanel();
    bp.setLayout(new GridLayout(7, 7));
    labs = new JButton[6][7]; 
    bp.add(b0 = new JButton("S"));
    bp.add(new JButton("M"));
    bp.add(new JButton("T"));
    bp.add(new JButton("W"));
    bp.add(new JButton("R"));
    bp.add(new JButton("F"));
    bp.add(new JButton("S"));
    ActionListener dateSetter = new ActionListener() {
    public void actionPerformed(ActionEvent e) {
    String num = e.getActionCommand();
    if (!num.equals("")) {
    setDayActive(Integer.parseInt(num));
     
    }
    }
    };
     
    for (int i = 0; i < 6; i++)
    for (int j = 0; j < 7; j++) {
    bp.add(labs[i][j] = new JButton(""));
    labs[i][j].addActionListener(dateSetter);
    }
    add(BorderLayout.SOUTH, bp);
    }
    public final static int dom[] = { 31, 28, 31, 30,
    31, 30, 31, 31,
    30, 31, 30, 31 ,
    };
    protected void recompute() {
    if (mm < 0 || mm > 11)
    throw new IllegalArgumentException("Month " + mm
    + " bad, must be 0-11");
    clearDayActive();
    calendar = new GregorianCalendar(yy, mm, dd);
    leadGap = new GregorianCalendar(yy, mm, 1).get(Calendar.DAY_OF_WEEK) - 1;
    int daysInMonth = dom[mm];
    if (isLeap(calendar.get(Calendar.YEAR)) && mm > 1)
    ++daysInMonth;
    for (int i = 0; i < leadGap; i++) {
    labs[0][i].setText("");
    }
    for (int i = 1; i <= daysInMonth; i++) {
    JButton b = labs[(leadGap + i - 1) / 7][(leadGap + i - 1) % 7];
    b.setText(Integer.toString(i));
    }
    for (int i = leadGap + 1 + daysInMonth; i < 6 * 7; i++) {
    labs[(i) / 7][(i) % 7].setText("");
    }
    if (thisYear == yy && mm == thisMonth)
    setDayActive(dd); // shade the box for today
    repaint();
    }
    public boolean isLeap(int year) {
    if (year % 4 == 0 && year % 100 != 0 || year % 400 == 0)
    return true;
    return false;
    }
     
    public void setDate(int yy, int mm, int dd) {
     
    this.yy = yy;
    this.mm = mm; // starts at 0, like Date
    this.dd = dd;
    recompute();
    }
    private void clearDayActive() {
    JButton b;
    if (activeDay > 0) {
    b = labs[(leadGap + activeDay - 1) / 7][(leadGap + activeDay - 1) % 7];
    b.setBackground(b0.getBackground());
    b.repaint();
    activeDay = -1;
    }
    }
    private int activeDay = -1;
    public void setDayActive(int newDay) {
    clearDayActive();
    if (newDay <= 0)
    dd = new GregorianCalendar().get(Calendar.DAY_OF_MONTH);
    else
    dd = newDay;
    Component square = labs[(leadGap + newDay - 1) / 7][(leadGap + newDay - 1) % 7];
    square.setBackground(Color.red);
    square.repaint();
    activeDay = newDay;
    }
    public static void main(String[] av) {
    JFrame f = new JFrame("Cal");
    Container c = f.getContentPane();
    c.setLayout(new FlowLayout());
    c.add(new Cal(1995, 2 - 1, 10));
    c.add(new Cal());
    f.pack();
    f.setVisible(true);
    }
    }
     
    AE1F1254-C276-6676-FDD8-29530854CB51
    1.03.01

  7. #7
    Junior Member
    Join Date
    Dec 2009
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Need a calandar app done asap

    Ah I could've done this for you. Sorry i read it late next time PM me on here
    Thanks,
    Saula

    Need more help?
    http://homeworkjava.com/

Similar Threads

  1. Need simple JAVA program fixing ASAP
    By theviper in forum Paid Java Projects
    Replies: 1
    Last Post: April 14th, 2010, 10:59 AM
  2. Data Structures(Binary Search Tree to AVL Tree)ASAP
    By jfAdik in forum Algorithms & Recursion
    Replies: 2
    Last Post: April 5th, 2010, 03:58 AM
  3. [SOLVED] find the position of the field separator in the String---need help ASAP
    By rajesh.mv in forum Java Theory & Questions
    Replies: 6
    Last Post: August 17th, 2009, 10:33 AM
  4. Replies: 1
    Last Post: April 1st, 2009, 02:47 PM