http://gall.dcinside.com/board/view/?id=programming&no=449351&page=2



여기 글썼었거든


지금 상황을보면


CalendarCell 클래스에서 더블클릭(클릭2번) 감지 -> CalendarPanel 클래스의 더블클릭 메소드로  보낸후 여기서 새 창을 띄움(TextWindow 클래스)


여기서 입력을 받아가지고 DaysPane클래스의 setScheduleNum메소드 호출함. 그리고 여기서 텍스트필드의 텍스트값이 제대로 전달됐나 확인했는데 잘됨.


마지막으로 DaysPane.setScheduleNum메소드에서 CalendarCell.setScheduleNum메소드를 호출해서 마지막으로 인자를 전달함.


여기서도 getText() 써보니 값은 매우 잘 나옴. 콘솔에 제대로 출력됨.


근데 문제는 셀에 저 텍스트값이 안들어가. 다들 UI업데이트가 문제라 하는데 난 초보라 뭐가뭔지 잘 모르겠어 ㅠㅠ setVisible(true)는 있는대로 다 써줬는데










public CalendarCell( CalendarPanel calendar, Dimension cellSize ) { // 각 셀에 날짜 및 스케쥴 Label을 붙이고 변수 초기화를 하는 생성자.

super();

this.calendar = calendar;

this.cellSize=cellSize;

this.bgColor = calendar.getBgColor();

this.setOpaque(true);

this.setPreferredSize( cellSize );

this.setLayout(new BorderLayout());

addMouseListener( this );    

dayinfo = new JPanel();

schedule = new JLabel();

schedule.setHorizontalAlignment(JLabel.CENTER);

dayinfo.setLayout(new BorderLayout());

add(schedule);

dayNum = new JLabel();

dayNum.setOpaque(true);

dayName = new JLabel();

dayName.setOpaque(true);

setVisible(true);

}


이게 CalendarCell의 생성자야. 이게 셀을 직접 만들고 이벤트 핸들링하는 클래스( 맨처음에 더블클릭 감지한 클래스)인데 뭐 빠진거 있나? ㅠㅠ