본문 바로가기

파워자바 솔루션29

[파워자바] 26장 프로그래밍 솔루션 답지 1. import java.awt.event.*; import java.applet.Applet; import java.awt.*; import javax.swing.*; public class Average extends JApplet implements ActionListener{ private JPanel panel1, panel2, panel3; private JTextField field1, field2, field3; private JLabel label1, label2, label3; private JLabel label4, label5, label6, label7, label8, label9; private JButton button; private float num1, num2, num3.. 2023. 2. 16.
[파워자바] 25장 프로그래밍 솔루션 답지 1. import java.io.*; import java.awt.*; import java.awt.event.*; import java.net.*; import javax.swing.*; class JEditorPaneFrame extends JFrame implements ActionListener{ private JTextField text; private JEditorPane edPane; private JScrollPane scroll; public JEditorPaneFrame(){ setTitle("JEditorPane"); setSize(700,700); edPane = new JEditorPane(); scroll = new JScrollPane(edPane); text = new JTe.. 2023. 2. 16.
[파워자바] 24장 프로그래밍 솔루션 답지 1. (1) import java.io.*; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; public class Test { public static void main(String[] args) { ArrayList list = new ArrayList(); try { FileReader fr = new FileReader("input.txt"); BufferedReader br = new BufferedReader(fr); while (true) { String line = br.readLine(); if (line == null) break; int value = Integer.parseInt(li.. 2023. 2. 16.
[파워자바] 23장 프로그래밍 솔루션 답지 1. import java.awt.BorderLayout; import java.awt.Color; import java.awt.Font; import java.awt.Graphics; import java.awt.GridLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; import java.text.DecimalFormat; import javax.swing.JButton; import javax.swing.JComponent; import javax.swing.JFrame; imp.. 2023. 2. 16.