Swing
-
java) Swing 코드 연습 ( JFrame 사용 ) + MnemonicJAVA/멀티스레드, 이벤트 2024. 5. 29. 12:27
▤ 목차" data-ke-type="html">HTML 삽입미리보기할 수 없는 소스 https://hi-hahahoho.tistory.com/26저번에 정리한 개념의 연장선으로 Swing을 연습해보려고한다.✔ SwingAWT 기술 기반으로 순수 자바 언어로 만들어진 라이브러리이다.AWT 기술 + 고급 컴포넌트native OS에 의존적이지 않다.만들기는 어렵지만 가볍다.Swing 특징클래스 이름이 J로 시작한다.JComponenet를 상속받는 클래스이다. (인스턴스 생성(new)이 불가능)AWT의 Container를 상속받는 클래스(JApplet, JDialog, JFrame ..등)이다.* JComponent : 스윙 컴포넌트의 공통 속성을 구현한 추상 클래스를말한다. ✔코드로 연습해보기💻 코드로 보..
-
java) 메모장 만들기 2) 나가기, 복사, 붙여 넣기, 잘라내기, 삭제, 글꼴크기, 모달창 띄우기JAVA/멀티스레드, 이벤트 2024. 5. 28. 20:48
▤ 목차" data-ke-type="html">HTML 삽입미리보기할 수 없는 소스✔ 나가기💻 코드로 보기else if (e.getSource() == mnuExit) { // 나가기 int close = JOptionPane.showConfirmDialog(this, "종료하시겠습니까?", "종료", JOptionPane.YES_NO_OPTION); switch (close) { case JOptionPane.YES_OPTION: System.exit(0); break; case JOptionPane.NO_OPTION: break; }👏 중요✔복사💻 코드로 보기else if (e.getSource() == mnuCopy) { // 복사// System...
-
java) 메모장 만들기 1) 메뉴 + 열기 + 저장JAVA/멀티스레드, 이벤트 2024. 5. 27. 10:59
▤ 목차" data-ke-type="html">HTML 삽입미리보기할 수 없는 소스✔ 메뉴바 만들기💻 코드로 보기// 메모장 만들기public class Memojang extends JFrame implements ActionListener { private JTextArea txtMemo = new JTextArea("", 10, 30); private String copyText; private JMenuItem mnuNew, mnuSave, mnuOpen, mnuExit; private JMenuItem mnuCopy, mnuPaste, mnuCut, mnuDel, mnuFontSize; private JMenuItem mnuAbout, mnuEtc1, mnuEtc2; public Memojan..