본문 바로가기

C.E/Java8

[API] JLabel public class JLabel extends JComponent implements SwingConstants, Accessible A display area for a short text string or an image, or both. A label does not react to input events. As a result, it cannot get the keyboard focus. A label can, however, display a keyboard alternative as a convenience for a nearby component that has a keyboard alternative but can't display it. //단문 문자열 또는 이미지를 위한 출력창이다... 2008. 10. 24.
[10_24] 소스 추가 설명-swing JFrame frame = new JFrame("HelloWorldSwing"); //window Creation (not visible) JLabel label1 = new JLabel("Hello!"); //Text Label Creation (not VIsible) frame.setLayout(new FLowLayout()); //must included - why? frame.getContentPane().add(label1); //Add Label to Frame frame.pack(); frame.setVisible(true); //set visible... 2008. 10. 24.
10_13 다시보기? Test @ 객체는 재사용성(reusability), 이식성, 유연성증가가 좋은 이유? •객체자료형(object type) // integer, boolean , ... •하나의사용자정의자료형(User-defined data type) //사용자가 만들어 타입처럼 사용가능 자료추상화(data abstraction)의방법 ->이 안의 모든 것을 넣었기 때문에 우리는 그냥 사용만 하면 된다. 객체(Object) ->물리적이던 구체적이던 모든 것? final -> 더 이상 수정 불가 PPT9(접근수정자) -> 외우고 이해하기^^ @static 알아두기! : 클래스 단위로 존재, 즉 메모리에 하나만 생성. Ex) 객체 도그1, 도그2, 도그3 3개의 객체가 있다면 static으로 선언된 변수는 공유한다. 정적변.. 2008. 10. 13.
인터페이스와 추상클래스 인터페이스란? 100%추상클래스! 추상클래스란? 인스턴스(객체)를 만들 수 없는 클래스 구상클래스란? 인스턴스를 만들어도 되는 구체적인 클래스 클래스 중에는 인스턴스를 만들면 안 되는 것도 있다. 만들 수 없게 하는 방법은? 클래스를 abstract로 지정해주면 된다. 단, 추상 유형 즉 abstract로 선언한 class를 레퍼런스로는 사용가능 abstract class pari(){ } ... 2008. 10. 11.