Page Index Toggle Pages: 1 Send TopicPrint
Hot Topic (More than 10 Replies) java Swing calendar (Read 10100 times)
Perla
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 7
Joined: May 14th, 2018
java Swing calendar
May 14th, 2018 at 7:22am
Print Post  
hello plz can you help me asap!!
the date in the header dont appear, plus when i write new appoinments, the text wont show in the box.
plus how can i save the appoinments so when i reopen the java app it will appear
thanks for your help
  
Back to top
 
IP Logged
 
Iva_P
YaBB Moderator
*****
Offline


I Love MindFusion!

Posts: 41
Joined: Jun 19th, 2013
Re: java Swing calendar
Reply #1 - May 14th, 2018 at 10:03am
Print Post  
Hello,

The scheduling library has various *settings properties (monthSettings, listSettings, daySettings...) for customizing the appearance of the calendar and the items. Probably you have either set the header style to a value that hides the navigation buttons and text or the header is too narrow to render the text. The same is true for items. I have prepared a simple project with a monthly calendar for you that uses some of the most common settings - font and size for the items and headers. In addition, the calendar saves the schedule upon exit. When the application starts, the schedule is loaded from the saved file.

Here is the link to download the sample calendar: https://mindfusion.eu/_samples/SampleCalendar.zip

Feel free to post any further questions regarding the library.

Kind Regards,
Iva
  
Back to top
 
IP Logged
 
Perla
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 7
Joined: May 14th, 2018
Re: java Swing calendar
Reply #2 - May 16th, 2018 at 8:32pm
Print Post  
hello, thnx for your fast reply, im trying to fix some errors, but when im using Protected Calendar cal;
and then cal.beginInit();
it give me errors, and if i use AwtCalendar i will get errors in another part in the code.
plz can u help?
thnx in advance.
  
Back to top
 
IP Logged
 
Iva_P
YaBB Moderator
*****
Offline


I Love MindFusion!

Posts: 41
Joined: Jun 19th, 2013
Re: java Swing calendar
Reply #3 - May 17th, 2018 at 9:30am
Print Post  
Hello,
I've changed the visibility of the calendar in the "SampleCalendar" app to protected, no errors. Could you zip me your project or provide some source code snippet how you use the Calendar?

The AwtCalendar class is no longer available, are you using an old version of the tool? Can you download the latest JPlanner version from our website and see if the problems persist?

Kind Regards,
Iva
  
Back to top
 
IP Logged
 
Perla
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 7
Joined: May 14th, 2018
Re: java Swing calendar
Reply #4 - May 17th, 2018 at 10:38am
Print Post  
this error always shows, and when i use awtcalendar it will disappear, and since 2 days only i downloaded the package JPlanner from the website
  

Back to top
 
IP Logged
 
Iva_P
YaBB Moderator
*****
Offline


I Love MindFusion!

Posts: 41
Joined: Jun 19th, 2013
Re: java Swing calendar
Reply #5 - May 17th, 2018 at 1:11pm
Print Post  
The screenshot does not show which Calendar you use. There is a Calendar class in java.util.Calendar and there's the MindFusion calendar library in com.mindfusion.scheduling.Calendar. Are you sure you've created an instance of MindFusion Calendar?
  
Back to top
 
IP Logged
 
Perla
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 7
Joined: May 14th, 2018
Re: java Swing calendar
Reply #6 - May 17th, 2018 at 7:31pm
Print Post  
sorry maybe im asking many questions Embarrassed
this is the mainwindow and the basewindow, i fixed some errors but some errors persist plz if you can help for the last timee.

calendar.getWeekRangeSettings().setHeaderStyle(EnumSet.of(WeekRangeHeaderStyle.T
itle));
error: The method of(E) in the type EnumSet is not applicable for the arguments (int)

if (e.getElement() == CustomDrawElements.TimetableItem)
error: Incompatible operand types CustomDrawElements and long

Font font = e.getStyle().getFont();
error: Type mismatch: cannot convert from com.mindfusion.drawing.Font to java.awt.Font

font = calendar.getItemSettings().getStyle().getFont();
error: Type mismatch: cannot convert from com.mindfusion.drawing.Font to
java.awt.Font

all the errors are in the mainwindow
the basewindow are clean from errors

thnx a lot, and im sorry for all the questionss!
  

MainWindow_001.txt ( 2 KB | 182 Downloads )
BaseWindow.txt ( 3 KB | 186 Downloads )
Back to top
 
IP Logged
 
Slavcho
God Member
*****
Offline


tech.support

Posts: 3146
Joined: Oct 19th, 2005
Re: java Swing calendar
Reply #7 - May 18th, 2018 at 7:58am
Print Post  
Hi,

It looks like you are are using sample code for latest version of the control trying to compile it against older version. See the API changes listed in the release notice here -
https://mindfusion.eu/Forum/YaBB.pl?num=1497361362

Regards,
Slavcho
Mindfusion
  
Back to top
 
IP Logged
 
Perla
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 7
Joined: May 14th, 2018
Re: java Swing calendar
Reply #8 - May 18th, 2018 at 8:17am
Print Post  
im using the lastest version of jplanner, so how can i solve the problems?
  
Back to top
 
IP Logged
 
Slavcho
God Member
*****
Offline


tech.support

Posts: 3146
Joined: Oct 19th, 2005
Re: java Swing calendar
Reply #9 - May 18th, 2018 at 8:59am
Print Post  
Apparently you are not using latest. Check if the jar file listed in your project's library path is indeed from latest version at https://mindfusion.eu/JPlannerTrial.zip

If you unzip JPlanner.jar from that archive, it shouldn't have classes such as com/mindfusion/drawing/Font.class as the ones reported by compiler errors above.
  
Back to top
 
IP Logged
 
Perla
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 7
Joined: May 14th, 2018
Re: java Swing calendar
Reply #10 - May 18th, 2018 at 9:14am
Print Post  
now i checked the drawing folder after downloading the latest version of JPlanner, the com/mindfusion/drawing/Font exist in the Font.html
  
Back to top
 
IP Logged
 
Slavcho
God Member
*****
Offline


tech.support

Posts: 3146
Joined: Oct 19th, 2005
Re: java Swing calendar
Reply #11 - May 18th, 2018 at 11:06am
Print Post  
javadoc/Font.html you mean? That seems left from an older export and is not linked from index.html. If you open the JAR archive in WinZip you can see it does not contain Font and AwtCalendar .class files. You can also find sample projects using the latest API under the 'JPlanner/samples' folder.
  
Back to top
 
IP Logged
 
Perla
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 7
Joined: May 14th, 2018
Re: java Swing calendar
Reply #12 - May 18th, 2018 at 12:18pm
Print Post  
okey, so i finally found the main problem, is that when im creating a calendar instance: protected Calendar calendar;
it takes another class, and not the class from com.mindfusion.scheduling.* and the import shows a warning that its never used , so do you have an idea how to fix it?
« Last Edit: May 18th, 2018 at 4:35pm by Perla »  
Back to top
 
IP Logged
 
Slavcho
God Member
*****
Offline


tech.support

Posts: 3146
Joined: Oct 19th, 2005
Re: java Swing calendar
Reply #13 - May 21st, 2018 at 5:25am
Print Post  
Try declaring the field as com.mindfusion.scheduling.Calendar, or import com.mindfusion.scheduling.Calendar specifically so it does not get hidden by java's own Calendar class.
  
Back to top
 
IP Logged
 
Capt.jack
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 10
Joined: Jan 12th, 2019
Re: java Swing calendar
Reply #14 - Jan 15th, 2019 at 6:14am
Print Post  
Hello Guys

Is there any one tries to connect the Calendar to a database?
The Calendar should mark the DATES if that date is on the Database

Please Help me
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint