@@ -116,7 +116,7 @@ private void makePanel(Dimension size) {
116116 JPanel shapePanel = new JPanel (new GridLayout (1 , 2 , 5 , 5 ));
117117 shapePanel .setBorder (BorderFactory .createEmptyBorder (4 , 4 , 4 , 4 ));
118118 shapePanel .add (new JLabel ("Shape:" ));
119- shapeCombo = new JComboBox (new String []{"Line" , "Path" , "Polygon" , "Circle" , "Ellipse" , "Square" , "Rectangle" });
119+ shapeCombo = new JComboBox <> (new String []{"Line" , "Path" , "Polygon" , "Circle" , "Ellipse" , "Square" , "Rectangle" });
120120 shapeCombo .addActionListener ((ActionEvent event ) -> {
121121 String item = (String ) ((JComboBox ) event .getSource ()).getSelectedItem ();
122122 switch (item ) {
@@ -151,7 +151,7 @@ private void makePanel(Dimension size) {
151151 JPanel pathTypePanel = new JPanel (new GridLayout (1 , 2 , 5 , 5 ));
152152 pathTypePanel .setBorder (BorderFactory .createEmptyBorder (4 , 4 , 4 , 4 ));
153153 pathTypePanel .add (new JLabel ("Path type:" ));
154- pathTypeCombo = new JComboBox (new String []{"Linear" , "Rhumb" , "Great circle" });
154+ pathTypeCombo = new JComboBox <> (new String []{"Linear" , "Rhumb" , "Great circle" });
155155 pathTypeCombo .setSelectedIndex (2 );
156156 pathTypeCombo .addActionListener ((ActionEvent event ) -> {
157157 String item = (String ) ((JComboBox ) event .getSource ()).getSelectedItem ();
@@ -175,7 +175,7 @@ private void makePanel(Dimension size) {
175175 JPanel unitsPanel = new JPanel (new GridLayout (1 , 2 , 5 , 5 ));
176176 unitsPanel .setBorder (BorderFactory .createEmptyBorder (4 , 4 , 4 , 4 ));
177177 unitsPanel .add (new JLabel ("Units:" ));
178- unitsCombo = new JComboBox (new String []{"M/M\u00b2 " , "KM/KM\u00b2 " , "KM/Hectare" , "Feet/Feet\u00b2 " ,
178+ unitsCombo = new JComboBox <> (new String []{"M/M\u00b2 " , "KM/KM\u00b2 " , "KM/Hectare" , "Feet/Feet\u00b2 " ,
179179 "Miles/Miles\u00b2 " , "Nm/Miles\u00b2 " , "Yards/Acres" });
180180 unitsCombo .setSelectedItem ("KM/KM\u00b2 " );
181181 unitsCombo .addActionListener ((ActionEvent event ) -> {
@@ -219,7 +219,7 @@ private void makePanel(Dimension size) {
219219 JPanel anglesPanel = new JPanel (new GridLayout (1 , 2 , 5 , 5 ));
220220 anglesPanel .setBorder (BorderFactory .createEmptyBorder (4 , 4 , 4 , 4 ));
221221 anglesPanel .add (new JLabel ("Angle Format:" ));
222- anglesCombo = new JComboBox (new String []{"DD" , "DMS" });
222+ anglesCombo = new JComboBox <> (new String []{"DD" , "DMS" });
223223 anglesCombo .setSelectedItem ("DD" );
224224 anglesCombo .addActionListener ((ActionEvent event ) -> {
225225 String item = (String ) ((JComboBox ) event .getSource ()).getSelectedItem ();
0 commit comments