전체 글39 Thread 타이머 import java.awt.*; import javax.swing.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; public class ThreadTest4 { public static void main(String[] args) { new ThreadTimerEx(); } } class ThreadTimerEx extends JFrame{ private static final long serialVersionUID = 1L; JButton btn_Start, btn_Stop, btn_Clear; JLabel timerLabel; boolean run_chk = false; public ThreadTimerEx().. 2022. 9. 16. GUI 이벤트 객체와 이벤트 소스 2022. 8. 30. GUI - JTebbedPane, ImageIcon 활용 예 public class GuiTest { public static void main(String[] args) { new P02_JTabbedPane(); } } class P02_JTabbedPane{ JFrame frame = new JFrame("P02_JTabbedPane"); JPanel panel1, panel2; JLabel label = new JLabel(); JRadioButton[] radio = new JRadioButton[4]; String[] fruits = {"사과","바나나","멜론","포도"}; ImageIcon[] icon = { new ImageIcon("image/apple.jpg"), new ImageIcon("image/banana.jpg"), new ImageI.. 2022. 8. 30. CSV Writer 사용 예제 package Test; import java.io.*; import java.nio.charset.Charset; import java.nio.file.Files; import java.nio.file.Paths; import java.util.*; public class CSVFileWriterPrectice { public static void main(String[] args) throws IOException { Random random = new Random(); List csvList = new ArrayList(); String[] head = new String[] {"이름","나이","성별","주소"}; csvList.add(Arrays.asList(head)); for(int i=1; i 2022. 8. 24. 이전 1 2 3 4 ··· 10 다음