Skip to content
Snippets Groups Projects
Commit 67a2416d authored by Erik Diers's avatar Erik Diers
Browse files

Updated GSON version + structual cleanup

parent ff6c0f27
No related branches found
No related tags found
No related merge requests found
......@@ -6,11 +6,12 @@
</attributes>
</classpathentry>
<classpathentry kind="src" path="src"/>
<classpathentry exported="true" kind="lib" path="jgoodies-forms-1.8.0.jar" sourcepath="jgoodies-forms-1.8.0-sources.jar"/>
<classpathentry exported="true" kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/3"/>
<classpathentry kind="lib" path="jcalendar-1.4.jar"/>
<classpathentry kind="lib" path="miglayout15-swing.jar" sourcepath="miglayout-src.zip"/>
<classpathentry kind="lib" path="gson-2.6.2.jar"/>
<classpathentry kind="lib" path="json-simple-1.1.jar"/>
<classpathentry kind="lib" path="libs/gson-2.10.1.jar"/>
<classpathentry kind="lib" path="libs/jcalendar-1.4.jar"/>
<classpathentry kind="lib" path="libs/jgoodies-forms-1.8.0.jar"/>
<classpathentry kind="lib" path="libs/jgoodies-forms-1.8.0-sources.jar"/>
<classpathentry kind="lib" path="libs/json-simple-1.1.jar"/>
<classpathentry kind="lib" path="libs/miglayout15-swing.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
File deleted
File added
File moved
File moved
File moved
File moved
......@@ -5,65 +5,61 @@
//
import java.awt.BorderLayout;
import java.awt.CardLayout;
import java.awt.Color;
import java.awt.Container;
import java.awt.Dimension;
import java.awt.EventQueue;
import java.awt.FlowLayout;
import java.awt.Font;
import java.awt.Image;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.KeyAdapter;
import java.awt.event.KeyEvent;
import java.awt.Font;
import java.awt.Dimension;
import java.awt.Color;
import java.awt.Container;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import javax.swing.AbstractListModel;
import javax.swing.ButtonGroup;
import javax.swing.DefaultComboBoxModel;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JList;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JRadioButton;
import javax.swing.JScrollPane;
import javax.swing.JSpinner;
import javax.swing.JTextArea;
import javax.swing.JTextField;
import javax.swing.ListSelectionModel;
import javax.swing.SpinnerNumberModel;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.DefaultComboBoxModel;
import javax.swing.JSpinner;
import javax.swing.JTextArea;
import javax.swing.JList;
import javax.swing.AbstractListModel;
import javax.swing.ButtonGroup;
import javax.swing.JScrollPane;
import javax.swing.border.MatteBorder;
import org.json.simple.JSONArray;
import org.json.simple.JSONObject;
import org.json.simple.parser.JSONParser;
import org.json.simple.parser.ParseException;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.function.Consumer;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import com.toedter.calendar.JDateChooser;
import com.google.gson.*;
import com.google.gson.Gson;
import javax.swing.border.Border;
import javax.swing.border.MatteBorder;
import com.google.gson.GsonBuilder;
import com.toedter.calendar.JDateChooser;
/**
* ======================================================================================================
* JFrame
......@@ -483,13 +479,14 @@ public class AppJ_V03 extends JFrame {
if(srcfile.exists() || srcfile1.exists() || srcfile2.exists()) {
Object obj1 = null;
System.out.println("Default Charset=" + Charset.defaultCharset());
if(srcfile.exists()) {
File file = new File(srcfile.toString());
SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy, HH:mm:ss");
dt = "Last modified : " + sdf.format(file.lastModified()) ;
//
JSONParser parser = new JSONParser();
obj1 = parser.parse(new FileReader(srcfile));
obj1 = parser.parse(new FileReader(srcfile)); // #Anchor 1 , StandardCharsets.UTF_8
} else if(srcfile1.exists()){
//
File file = new File(srcfile1.toString());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment