Eclipse 에서 org.eclipse.jface.dialogs.Dialog 를 상속받아 Custom Dialog  를 구현하다보면,

setTitle() 이나 setImage() 등의 메소드가 존재하지 않아 당황 스러운 경우가 있다.


이때는 당황하지말고 protected void configureShell(Shell shell) 함수를 override 하면 title 이나 title image 등을 편집할 수 있다.

1.@Override
2.protected void configureShell(Shell shell) {
3.    super.configureShell(shell);
4.    shell.setText("My Custom Label");
5.}


configureShell 함수 Override 전


configureShell 함수 Override 후



참고: http://wiki.eclipse.org/FAQ_How_do_I_set_the_title_of_a_custom_dialog%3F

Posted by leechwin
,