This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Java in General and the fly likes Help Please Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Help Please" Watch "Help Please" New topic
Author

Help Please

Angelo Watson
Ranch Hand

Joined: Oct 27, 2002
Posts: 39
Im creating my UI and I want to create a calendar that shows all the days of the month.
Basically I need help creating a calendar the only thing that I dont know how to do is creating a white box and inside that box it contains one of the days.
Thank You for your help.
karl koch
Ranch Hand

Joined: May 25, 2001
Posts: 388
hi
- you can create you own JPanel, overriding the paint() method to do your own stuff....(like drawing rectangels, circles, filling boxes writting text)
- use a JLabel with the text (or icons or whatever)
- use a JButton if you need to click it.
- im sure somebody did this before...if it was not an assignment, then search the web for a ready made component that does the trick
find more on java swing:
swing tutorial
if you give us more infos on what you wanna do, maybe we can gove more detailed answers.
k
Layne Lund
Ranch Hand

Joined: Dec 06, 2001
Posts: 3061
Also check out GridLayout and GridBagLayout. As the names suggest, these let you create a grid of components. Each day could be a seperate descendant of JPanel as suggested above.
HTH
Layne


Java API Documentation
The Java Tutorial
Angelo Watson
Ranch Hand

Joined: Oct 27, 2002
Posts: 39
can you implement an event handler on a JLabel
 
 
subject: Help Please
 
Similar Threads
Calendar UI with Multiple selection
select boxes depends on other select box
How do I get an event fired through javascript?
VB.net
How to create google calendar in JSP