/** * Update the button labels and colors to reflect date selection. */ private void refreshButtons() { final Calendar c = getFirstVisibleDate(); for (int i = 0; i < 42; i++) { final JButton b = this.buttons[i]; b.setText(Integer.toString(c.get(Calendar.DATE))); b.setBackground(getButtonColor(c)); c.add(Calendar.DATE, 1); } }
/** * Update the button labels and colors to reflect date selection. */ private void refreshButtons() { final Calendar c = getFirstVisibleDate(); for (int i = 0; i < 42; i++) { final JButton b = this.buttons[i]; b.setText(Integer.toString(c.get(Calendar.DATE))); b.setBackground(getButtonColor(c)); c.add(Calendar.DATE, 1); } }
/** * Update the button labels and colors to reflect date selection. */ private void refreshButtons() { final Calendar c = getFirstVisibleDate(); for (int i = 0; i < 42; i++) { final JButton b = this.buttons[i]; b.setText(Integer.toString(c.get(Calendar.DATE))); b.setBackground(getButtonColor(c)); c.add(Calendar.DATE, 1); } }
final JButton b = (JButton) e.getSource(); final int i = Integer.parseInt(b.getName()); final Calendar cal = getFirstVisibleDate(); cal.add(Calendar.DATE, i); setDate(cal.getTime());
final JButton b = (JButton) e.getSource(); final int i = Integer.parseInt(b.getName()); final Calendar cal = getFirstVisibleDate(); cal.add(Calendar.DATE, i); setDate(cal.getTime());
final JButton b = (JButton) e.getSource(); final int i = Integer.parseInt(b.getName()); final Calendar cal = getFirstVisibleDate(); cal.add(Calendar.DATE, i); setDate(cal.getTime());