This question already has an answer here:
- How to get month name from Calendar 13 answers
I try to initialize my JCheckBoxes(month and year) with month = monthname and the year.
So the difficult part is that I must use "Calender".class and "GregorianCalendar".class .
My dont explain it to much. He just said that if the programm start at the first time it should have the current date selected another difficulty.
I really try to read the javadoc but I dont understand them if I am honest.
I know there is a Method for the class "Local Date" called now() but this method does not exist on the both class I must use.
Calendar calendar = Calendar.getInstance();
GregorianCalendar gregorianCalendar = new GregorianCalendar();
JPanel panel = new JPanel(new FlowLayout());
panel.add(new JLabel("Please choose"));
panel.add(new JLabel("Month:"));
panel.add(new JLabel("Year:"));
panel.add(new JComboBox(new String[]{"String1", "String2"}));
panel.add(new JComboBox(new String[]{"String1", "String2"}));
ImageIcon imageIcon = new ImageIcon("");
panel.add(new JLabel(imageIcon));
return panel;
I hope you guys can help and I know I dont give you much information and I am feeling really bad. But you can give me also a little hint.
Best Regards
Josh
Aucun commentaire:
Enregistrer un commentaire