목록Java (58)
mojo's Blog
JList 연습 code import javax.swing.*; // JFrame import java.awt.*; // Container import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.ItemEvent; import java.awt.event.ItemListener; import java.awt.event.KeyAdapter; import java.awt.event.KeyEvent; import java.awt.event.MouseEvent; import java.awt.event.MouseListener; import java.awt.event.MouseMotionListener..
JTextField 연습 코드 import javax.swing.*; // JFrame import java.awt.*; // Container import java.awt.event.ItemEvent; import java.awt.event.ItemListener; import java.awt.event.KeyAdapter; import java.awt.event.KeyEvent; import java.awt.event.MouseEvent; import java.awt.event.MouseListener; import java.awt.event.MouseMotionListener; import java.awt.*; public class TextFieldEx extends JFrame{ TextFiel..
JCheckBox 구현 import javax.swing.*; // JFrame import java.awt.*; // Container import java.awt.event.KeyAdapter; import java.awt.event.KeyEvent; import java.awt.event.MouseEvent; import java.awt.event.MouseListener; import java.awt.event.MouseMotionListener; import java.awt.*; public class MyFrame extends JFrame { private JLabel la; public MyFrame() { setTitle("Open Challenge 10"); setDefaultClose..
컴포넌트에 폰트를 설정하는 방법 익히기 (폰트 크기 변경) import javax.swing.*; // JFrame import java.awt.*; // Container import java.awt.event.KeyAdapter; import java.awt.event.KeyEvent; import java.awt.event.MouseEvent; import java.awt.event.MouseListener; import java.awt.event.MouseMotionListener; import java.awt.*; public class MyFrame extends JFrame { private JLabel la; public MyFrame() { setTitle("Open Challenge 1..
Swing으로 간단한 갬블링 게임 만들기 code import javax.swing.*; // JFrame import java.awt.*; // Container import java.awt.event.KeyAdapter; import java.awt.event.KeyEvent; import java.awt.event.MouseEvent; import java.awt.event.MouseListener; import java.awt.event.MouseMotionListener; import java.awt.*; public class MyFrame extends JFrame { private JLabel la[], result_La; public MyFrame() { setTitle("Open Cha..
key Listener code import javax.swing.*; // JFrame import java.awt.*; // Container import java.awt.event.KeyAdapter; import java.awt.event.KeyEvent; import java.awt.*; public class KeyListenerEx extends JFrame{ private JLabel [] keyMessage; public KeyListenerEx(){ setTitle("Action 이벤트 리스너 예제"); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); Container c=getContentPane(); c.setLayout(new FlowLayou..