質問編集履歴
1
import分を追記しました。
test
CHANGED
File without changes
|
test
CHANGED
@@ -20,6 +20,14 @@
|
|
20
20
|
### 該当のソースコード
|
21
21
|
|
22
22
|
```Java
|
23
|
+
import java.awt.BorderLayout;
|
24
|
+
|
25
|
+
import javax.swing.JComboBox;
|
26
|
+
import javax.swing.JPanel;
|
27
|
+
import javax.swing.JScrollPane;
|
28
|
+
import javax.swing.JTable;
|
29
|
+
import javax.swing.JTextField;
|
30
|
+
|
23
31
|
public class MainPanel {
|
24
32
|
private DataHandler dataHandler;
|
25
33
|
private JTable table;
|
@@ -34,6 +42,33 @@
|
|
34
42
|
```
|
35
43
|
|
36
44
|
```Java
|
45
|
+
import java.io.BufferedReader;
|
46
|
+
import java.io.BufferedWriter;
|
47
|
+
import java.io.File;
|
48
|
+
import java.io.FileInputStream;
|
49
|
+
import java.io.FileOutputStream;
|
50
|
+
import java.io.IOException;
|
51
|
+
import java.io.InputStreamReader;
|
52
|
+
import java.io.OutputStreamWriter;
|
53
|
+
import java.io.StringReader;
|
54
|
+
import java.nio.charset.Charset;
|
55
|
+
import java.nio.file.Files;
|
56
|
+
import java.nio.file.Paths;
|
57
|
+
import java.util.ArrayList;
|
58
|
+
import java.util.Arrays;
|
59
|
+
import java.util.Collections;
|
60
|
+
import java.util.HashMap;
|
61
|
+
import java.util.List;
|
62
|
+
import java.util.Map;
|
63
|
+
import java.util.stream.Collectors;
|
64
|
+
|
65
|
+
import javax.swing.DefaultCellEditor;
|
66
|
+
import javax.swing.JFileChooser;
|
67
|
+
import javax.swing.JOptionPane;
|
68
|
+
import javax.swing.JTable;
|
69
|
+
import javax.swing.JTextField;
|
70
|
+
import javax.swing.table.DefaultTableModel;
|
71
|
+
|
37
72
|
public class DataHandler {
|
38
73
|
private static final String FORMAT_FILE_PATH = "formatFile";
|
39
74
|
private static final String ENCODING = "shift_jis";
|
@@ -71,6 +106,17 @@
|
|
71
106
|
```
|
72
107
|
|
73
108
|
```Java
|
109
|
+
import java.awt.event.ActionEvent;
|
110
|
+
import java.awt.event.ActionListener;
|
111
|
+
import java.io.File;
|
112
|
+
|
113
|
+
import javax.activation.DataHandler;
|
114
|
+
import javax.swing.JButton;
|
115
|
+
import javax.swing.JComboBox;
|
116
|
+
import javax.swing.JFileChooser;
|
117
|
+
import javax.swing.JTable;
|
118
|
+
import javax.swing.JTextField;
|
119
|
+
|
74
120
|
public class ButtonActions {
|
75
121
|
private DataHandler dataHandler;
|
76
122
|
private JTable table;
|