Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

GUI calander

 
Habtamu Endalamaw
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hey guys i'm new to java and i need to make GUI calendar and i don't know how. so please help me and don't get confused with the variables cos they are Ethiopian words. here is the code

 
Darryl Burke
Bartender
Posts: 5126
11
Java Netbeans IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't see anything GUI related in the code you posted. Perhaps you mean that you aren't aware of how to create a GUI? If that's so, you need to go through the Swing tutorial systematically.

And welcome to the Ranch!
 
Tobias Leon
Greenhorn
Posts: 22
Eclipse IDE Java Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there Habtamu:

If you only need a calendar, maybe this code can help you, but is Java SWT.

Check this snippet:
http://www.java2s.com/Tutorial/Java/0280__SWT/CreateaDateTimecalendardateandtimeinadialog.htm

Regards !!!
 
Campbell Ritchie
Sheriff
Pie
Posts: 48968
60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would suggest you need to go back to creating an EthiopianCalendar class and running it fom the command line before you try it in a GUI. It would appear from this that there is nothing available, but Googling for Java Ethiopian calendar, and this ad from Google might give you something to use instead.

I would suggest for your class, it looks confusing having that many fields. You should consider an enum for Ethiopian months instead of that switch block. You should avoid if (...) b = true; else b = false; It is bad style; see this link. It is also bad style and error prone to write == true or similar.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic