|
|
Welcome to the Java Forums.
You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:
- have access to post topics
- communicate privately with other members (PM)
- not see advertisements between posts
- have the possibility to earn one of our surprises if you are an active member
- access many other special features that will be introduced later.
Registration is fast, simple and absolutely free so please, join our community today!
If you have any problems with the registration process or your account login, please contact us.
|
|

05-11-2007, 09:07 PM
|
|
Member
|
|
Join Date: May 2007
Posts: 4
|
|
|
calendar
do you know any tool to do a nice calendar?
I am trying to do a calendar with code and... it is so hard.
|
|

05-11-2007, 10:59 PM
|
|
Member
|
|
Join Date: Apr 2007
Location: Indiana
Posts: 84
|
|
|
|
|

05-12-2007, 09:08 AM
|
|
Senior Member
|
|
Join Date: Mar 2007
Posts: 136
|
|
|
Look I have done a calendar in SWT It is simple.
Logical Details .
Use the java Calendar Object.
Graphical Details.
I have 49 labels which are arranged in the grid layout 7x7.
important methods
createLabels();//draw labels
assignLabels();//Assign text to the date based on the month.
Use calendar roll method for the date and month change.
That is it
|
|

06-25-2008, 10:56 PM
|
|
Member
|
|
Join Date: Jun 2008
Posts: 5
|
|
|
perpetual calendar
Dude, try to develop your program from the logic of that code below, which I developed for work in my college.
import java.util .*;
Import javax.swing.JOptionPane;
Import static java.util.Calendar .*;
Public Class perpetualcalendar (
public static void main (String [] args) (
int op = 0;
while (op! = 2) (
op = Integer.parseInt (JOptionPane.showInputDialog (null, "JAVA PERPETUAL CALENDAR === === \ n" +
"1 - Start \ n" +
"2 - Exit"));
if (op == 1) (
int day1 = Integer.parseInt (JOptionPane.showInputDialog (null, "Enter the desired day :"));
int mon1 = Integer.parseInt (JOptionPane.showInputDialog (null, "Enter the desired months :"));
int year1 = Integer.parseInt (JOptionPane.showInputDialog (null, "Between the years desired :"));
Calendar lime = Calendar.getInstance ();
cal.set (YEAR, year1);
cal.set (MONTH, mon1);
cal.set (DAY_OF_MONTH, day1);
String [] = (days1 "," "Sunday", "Monday", "Tuesday",
"Wednesday", "Thursday", "Friday", "Saturday"
);
int dayweek = cal.get (DAY_OF_WEEK);
JOptionPane.showMessageDialog (null, days1 [dayweek]);
)
)
)
)
|
|

06-26-2008, 06:41 AM
|
 |
Moderator
|
|
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 4,609
|
|
What's this code. Seems to me mixture with Java any something else From the class definition there are lots of errors I can see. Please check such codes before adding to the forum. Lots of errors I can pointed without testing this code pal.
__________________
Use an appropriate Subject. "Help, urgent!" isn't one. To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Has someone helped you? Then you can To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. their helpful post.
Want to make your IDE the best? To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
|

06-26-2008, 04:39 PM
|
|
Member
|
|
Join Date: Jun 2008
Posts: 5
|
|
|
the code is correct, yes, you Eranga, you should learn a little more than Java and then yes criticize any code.
excuse anything!
|
|

06-26-2008, 06:26 PM
|
 |
Senior Member
|
|
Join Date: Jan 2008
Location: Cebu City, Philippines
Posts: 527
|
|
I guess that code couldn't be compiled....
Based on the source code above,
Import static java.util.Calendar .*;
unless you created/used other java api from third party vendors
I think Calendar is a java source code from src.zip file that can be found on jdk folder, not a folder....
__________________
A specific, detailed, simple, well elaborated, and "tested before asking" question may gather more quick replies. hopefully To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
|

06-27-2008, 06:25 AM
|
 |
Moderator
|
|
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 4,609
|
|
Originally Posted by reginaldofsilva
the code is correct, yes, you Eranga, you should learn a little more than Java and then yes criticize any code.
excuse anything!
Here comes another mad guy.
I challenge you, this is not a valid Java code. Can you take my challenge? Don't be a fool man, in your class there are hundreds of errors, which are not valid in Java. I'm not talking about any other language, because this is a Java forum too.
If you can take my challenge, replay to this post.
__________________
Use an appropriate Subject. "Help, urgent!" isn't one. To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Has someone helped you? Then you can To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. their helpful post.
Want to make your IDE the best? To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
|

06-27-2008, 05:06 PM
|
 |
Senior Member
|
|
Join Date: Jan 2008
Location: Cebu City, Philippines
Posts: 527
|
|
Hey eranga,
Stay calm.... 
__________________
A specific, detailed, simple, well elaborated, and "tested before asking" question may gather more quick replies. hopefully To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
|

06-28-2008, 06:07 AM
|
 |
Moderator
|
|
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 4,609
|
|

Hi sukatoa, I'm cool all the time. But read his post, if he doesn't know things exactly better to wait and listen to others. As I said I can show around 20 errors in that code. In that sense he said to me, learn Java.
__________________
Use an appropriate Subject. "Help, urgent!" isn't one. To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Has someone helped you? Then you can To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. their helpful post.
Want to make your IDE the best? To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
|

07-29-2008, 11:11 PM
|
|
Member
|
|
Join Date: Jun 2008
Posts: 5
|
|
|
I use the NetBeans IDE and can compile the code normally.
|
|

08-08-2008, 12:54 AM
|
|
Member
|
|
Join Date: Jul 2008
Posts: 3
|
|
Originally Posted by John
do you know any tool to do a nice calendar?
I am trying to do a calendar with code and... it is so hard.
the best calendar you can get is the one from Nebula project(eclipse.org/nebula/widgets/calendarcombo/calendarcombo.php)
See this link and you will see other very interesting stuff about calendars and dates!!!
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|