yuhoo! HELP ME PLEASE...IM DESPERATECALENDAR WITH GUI...
18 Replies - 797 Views - Last Post: 02 February 2010 - 06:15 PM
#1
yuhoo! HELP ME PLEASE...IM DESPERATE
Posted 01 February 2010 - 06:22 PM
--PROGRAM SHOULD ASK WHAT YEAR AND WHAT MONTH TO DISPLAY
--USE ARRAYS AND METHODS ONLY...
--SIMPLE JOPTIONPANE FUNCTIONS....
Replies To: yuhoo! HELP ME PLEASE...IM DESPERATE
#2
Re: yuhoo! HELP ME PLEASE...IM DESPERATE
Posted 01 February 2010 - 06:27 PM
Dream.In.Code has a policy by which we prefer to see a good faith effort on your part before providing source code for homework assignments. Please post the code you have written in an effort to resolve the problem, and our members would be happy to provide some guidance. Be sure to include a description of any errors you are encountering as well.
Please post like this:
Thank you for helping us helping you.
#3
Re: yuhoo! HELP ME PLEASE...IM DESPERATE
Posted 01 February 2010 - 06:28 PM
[rules][/rules]
Also, all caps on a forum generally means that you are yelling, please refrain from doing something. Also, if you want help, please give your post a meaningful title, and explain in the body what is wrong with the code that you need to give us. No work, no result. Sorry.
Remember,
#4
Re: yuhoo! HELP ME PLEASE...IM DESPERATE
Posted 01 February 2010 - 06:44 PM
these are the conditions:
--program should ask the user to enter the year and month...
--should only use arrays and methods..
--use simple joptionpane...
THIS IS MY CALENDAR PROGRAM: PLEASE HELP ME MAKE A GUI....USING SIMPLE JOPTIONPANE...PLEASE
public class Main {
public static void main(String[] args) {
String[] monthNames = new String[]{"January", "February", "March", "April", "May", "June", "July","August", "September", "October", "November", "December"};
int[] corDaysOfMonth = new int[]{31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
int firstDayOfMonth = 5;
for(int ctr=0; ctr<monthNames.length; ctr++){
firstDayOfMonth=printMonth(monthNames[ctr],firstDayOfMonth,corDaysOfMonth[ctr]);
}
}
public static int printMonth(String monthName, int firstDayOfMonth, int corDaysOfMonth){
System.out.println(monthName);
int curDayOfWeek = 0;
System.out.println("Sun Mon Tue Wed Thu Fri Sat");
while(curDayOfWeek<firstDayOfMonth){
System.out.print(" ");
curDayOfWeek++;
}
for(int day = 1; day<=corDaysOfMonth; day++){
if(day<10){
System.out.print(day+" ");
}else{
System.out.print(day+" ");
}
curDayOfWeek++;
if(curDayOfWeek==7){
curDayOfWeek = 0;
System.out.println();
}
}
System.out.println();
return curDayOfWeek;
}
}
#5
Re: yuhoo! HELP ME PLEASE...IM DESPERATE
Posted 01 February 2010 - 06:46 PM
And as was explained to you about three times in your last post, please
#6
Re: yuhoo! HELP ME PLEASE...IM DESPERATE
Posted 01 February 2010 - 06:47 PM
If you're looking to use JOptionPane's, check out the following link: http://java.sun.com/...OptionPane.html
And again, please stop SHOUTING AT US BY TYPING IN ALL CAPS. It is considered rude.
#7
Re: yuhoo! HELP ME PLEASE...IM DESPERATE
Posted 01 February 2010 - 06:52 PM
---PROGRAM SHOULD ASK USER TO INPUT YEAR AND MONTH...RANGING FROM YEAR 2010 TO 2015....THANKS A LOT....ESPECIALLY THOSE WHO ARE HELPING IN THIS WEBSITE...IT REALLY HELPED ME A LOT....
THIS IS MY PROGRAM....PLEASE EDIT IT AND MAKE A SIMPLE GUI...THANKS THANKS THANKS...
public class Main {
public static void main(String[] args) {
String[] monthNames = new String[]{"January", "February", "March", "April", "May", "June", "July","August", "September", "October", "November", "December"};
int[] corDaysOfMonth = new int[]{31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
int firstDayOfMonth = 5;
for(int ctr=0; ctr<monthNames.length; ctr++){
firstDayOfMonth=printMonth(monthNames[ctr],firstDayOfMonth,corDaysOfMonth[ctr]);
}
}
public static int printMonth(String monthName, int firstDayOfMonth, int corDaysOfMonth){
System.out.println(monthName);
int curDayOfWeek = 0;
System.out.println("Sun Mon Tue Wed Thu Fri Sat");
while(curDayOfWeek<firstDayOfMonth){
System.out.print(" ");
curDayOfWeek++;
}
for(int day = 1; day<=corDaysOfMonth; day++){
if(day<10){
System.out.print(day+" ");
}else{
System.out.print(day+" ");
}
curDayOfWeek++;
if(curDayOfWeek==7){
curDayOfWeek = 0;
System.out.println();
}
}
System.out.println();
return curDayOfWeek;
}
}
#8
Re: yuhoo! HELP ME PLEASE...IM DESPERATE
Posted 01 February 2010 - 06:52 PM
http://www.dreaminco...snippet4707.htm
http://www.dreaminco...snippet4706.htm
#9
Re: yuhoo! HELP ME PLEASE...IM DESPERATE
Posted 01 February 2010 - 06:53 PM
edit: I regained my cool.
This post has been edited by Dogstopper: 01 February 2010 - 06:55 PM
#10
Re: yuhoo! HELP ME PLEASE...IM DESPERATE
Posted 01 February 2010 - 07:00 PM
#11
Re: yuhoo! HELP ME PLEASE...IM DESPERATE
Posted 01 February 2010 - 07:03 PM
#12
Re: yuhoo! HELP ME PLEASE...IM DESPERATE
Posted 01 February 2010 - 07:03 PM
#13
Re: yuhoo! HELP ME PLEASE...IM DESPERATE
Posted 01 February 2010 - 07:05 PM
Post only ONE topic for your question. And please show some effort. We WILL NOT do this for you
#14
Re: yuhoo! HELP ME PLEASE...IM DESPERATE
Posted 01 February 2010 - 07:10 PM
Sorry but we can not give you the entire code to solve your problem. We are here to assist in solving problems with code you have written, with any error messages you are getting or what isn't working the way that you expect it to, we would be more than happy to help you with those problems. If there is a topic that you don't understand we would be more than happy to help you with that as well. Make sure to post any code with in code tags like below.
Be sure to visit our tutorial and snippet areas or read the FAQS at the top of the forums. Also, take a moment to read the rules about posting topics.
Thank you for helping us to help you solve your problem.
#15
Re: yuhoo! HELP ME PLEASE...IM DESPERATE
Posted 02 February 2010 - 05:56 PM
String name;
name=JOptionPane.showInputDialog.("Please enter name");
JOptionPane.showMessageDialog(null,"Welcome "+name+"!to java","Greetings",JOptionPane.INFORMATION_MESSAGE);
THANKS...URGENTLY NEEDED AND DESPERATELY NEEDED...
|
|

New Topic/Question
This topic is locked




MultiQuote










|