* Insets : 여백을 관리하는 클래스
- Construct : Insets(int , int , int , int) -> 상 좌 하 우 (반시계방향)
- Field : top , left ,bottom, right
* MenuShortcut : 메뉴에 대해서 단축키를 지정할 수 있는 클래스
-Construct : MenuShortcut(int) -> Ctrl + @
MenuShortcut(int , boolean) - > ctrl + int + shift 의 조합을 만듬
-메소드 : getkey() , usesShiftModifier()
사용 예)
Insets ins = this.getInsets(); // Insets (여백 값 얻어 오기) set 으로 변경가능
private MenuShortcut msc = new MenuShortcut(KeyEvent.VK_E); // msc 생성 하고
private MenuItem fexit = new MenuItem("Exit",msc); // 메뉴아이템에 직접 추가 가능 하고
//fexit.setShortcut(msc); // init() 에 직접 생성도 가능
'JAVA > AWT' 카테고리의 다른 글
이벤트 (0) | 2013.02.28 |
---|---|
Graphics2D - Font (0) | 2013.02.28 |
Robot 클래스 (0) | 2013.02.28 |
GridBagLayout 과 GridBagConstraints (0) | 2013.02.28 |
Frame(AWT) (0) | 2013.02.26 |