Commit cc3c237b authored by Hendro Triokta Brianto's avatar Hendro Triokta Brianto
Browse files

test server

parent 0cbfb434
......@@ -5,6 +5,7 @@
*/
package thealchemist.gui;
import java.io.IOException;
import java.util.ArrayList;
import java.util.logging.Level;
import java.util.logging.Logger;
......@@ -40,7 +41,7 @@ public class AlcFindItem extends javax.swing.JFrame {
private void setInventory(){
try {
String _x = respon.inventoryOK(connection.inventory());
String _x = connection.inventory();
ArrayList<String> list = connection.JSONtoArray("inventory", _x);
txtCount0.setText(list.get(0));
......@@ -56,6 +57,8 @@ public class AlcFindItem extends javax.swing.JFrame {
} catch (JSONException ex) {
Logger.getLogger(AlcItem.class.getName()).log(Level.SEVERE, null, ex);
} catch (IOException ex) {
Logger.getLogger(AlcFindItem.class.getName()).log(Level.SEVERE, null, ex);
}
}
/**
......@@ -450,7 +453,7 @@ public class AlcFindItem extends javax.swing.JFrame {
private void btnFindActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnFindActionPerformed
String hasilrespon;
try {
hasilrespon = respon.sendFindOK(connection.sendFind(idItem));
hasilrespon = connection.sendFind(idItem);
if(connection.JSONtoString("status", hasilrespon).equals("ok")){
System.out.println("ok");
}
......@@ -459,6 +462,8 @@ public class AlcFindItem extends javax.swing.JFrame {
new AlcTradeItem(connection).setVisible(true);
} catch (JSONException ex) {
Logger.getLogger(AlcFindItem.class.getName()).log(Level.SEVERE, null, ex);
} catch (IOException ex) {
Logger.getLogger(AlcFindItem.class.getName()).log(Level.SEVERE, null, ex);
}
}//GEN-LAST:event_btnFindActionPerformed
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment