Commit e17fbd95 authored by Susanti Gojali's avatar Susanti Gojali
Browse files

fix conflict

parent f1ae335f
......@@ -482,8 +482,8 @@
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="null"/>
</Property>
<Property name="tableHeader" type="javax.swing.table.JTableHeader" editor="org.netbeans.modules.form.editors2.JTableHeaderEditor">
<TableHeader reorderingAllowed="false" resizingAllowed="true"/>
<Property name="tableHeader" type="javax.swing.table.JTableHeader" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
<Connection code="null" type="code"/>
</Property>
<Property name="updateSelectionOnSort" type="boolean" value="false"/>
</Properties>
......@@ -584,11 +584,9 @@
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" attributes="0">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="103" groupAlignment="0" attributes="0">
<Component id="HerbsIcon" min="-2" max="-2" attributes="0"/>
<Component id="ClayIcon" min="-2" max="-2" attributes="0"/>
<Component id="MineralIcon" min="-2" max="-2" attributes="0"/>
</Group>
<Component id="HerbsIcon" min="-2" max="-2" attributes="0"/>
<Component id="ClayIcon" min="-2" max="-2" attributes="0"/>
<Component id="MineralIcon" min="-2" max="-2" attributes="0"/>
<Group type="102" alignment="0" attributes="0">
<Component id="HoneyIcon" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
......
......@@ -9,7 +9,6 @@ import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.ImageIcon;
import javax.swing.JOptionPane;
<<<<<<< HEAD
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.table.AbstractTableModel;
......@@ -17,9 +16,8 @@ import javax.swing.table.DefaultTableModel;
import javax.swing.table.TableColumn;
import javax.swing.table.TableColumnModel;
import javax.swing.table.TableModel;
=======
import org.json.JSONArray;
>>>>>>> f49f35941c855b388307f2c54b28647caeb9e5c3
import org.json.JSONObject;
......@@ -340,7 +338,7 @@ public class MainPage extends javax.swing.JFrame {
);
mapTable.setName(""); // NOI18N
mapTable.setPreferredSize(null);
mapTable.getTableHeader().setReorderingAllowed(false);
mapTable.setTableHeader(null);
mapTable.setUpdateSelectionOnSort(false);
mapScrollPane.setViewportView(mapTable);
mapTable.getAccessibleContext().setAccessibleDescription("");
......@@ -458,10 +456,9 @@ public class MainPage extends javax.swing.JFrame {
Level1PanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(Level1PanelLayout.createSequentialGroup()
.addGroup(Level1PanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(Level1PanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(HerbsIcon)
.addComponent(ClayIcon)
.addComponent(MineralIcon))
.addComponent(HerbsIcon)
.addComponent(ClayIcon)
.addComponent(MineralIcon)
.addGroup(Level1PanelLayout.createSequentialGroup()
.addComponent(HoneyIcon)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
......@@ -1032,7 +1029,8 @@ public class MainPage extends javax.swing.JFrame {
mapTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
mapTable.setPreferredScrollableViewportSize(mapTable.getPreferredSize());
mapTable.setTableHeader(null);
showMessage("Map load");
} else {
......@@ -1126,11 +1124,7 @@ public class MainPage extends javax.swing.JFrame {
private javax.swing.JPanel inventoryPanel;
private javax.swing.JLabel ipaddressLabel;
private javax.swing.JTextField ipaddressTextField;
<<<<<<< HEAD
=======
private javax.swing.JLabel jLabel2;
private javax.swing.JLabel jLabel3;
>>>>>>> f49f35941c855b388307f2c54b28647caeb9e5c3
private javax.swing.JButton loginButton;
private javax.swing.JLabel loginLabel;
private javax.swing.JPanel loginPanel;
......
......@@ -368,7 +368,7 @@ public class TCPClient {
return responseJSON;
}
<<<<<<< HEAD
public static void main(String argv[]) throws Exception
{
TCPClient client = new TCPClient("localhost", 6789);
......@@ -497,128 +497,7 @@ public class TCPClient {
=======
// public static void main(String argv[]) throws Exception
// {
// TCPClient client = new TCPClient("localhost", 6789);
//
//// do {
//// BufferedReader inFromUser = new BufferedReader( new InputStreamReader(System.in));
//// DataOutputStream outToServer = new DataOutputStream(clientSocket.getOutputStream());
//// BufferedReader inFromServer = new BufferedReader(new InputStreamReader(clientSocket.getInputStream()));
////
//// // Test Register
//// do {
//// System.out.println("Register");
//// System.out.print("Username : "); username = inFromUser.readLine();
//// System.out.print("Password : "); password = inFromUser.readLine();
//// String toSend = registerJSON(username, password).toString();
////
//// outToServer.writeBytes(toSend + '\n');
////
//// String response = inFromServer.readLine();
//// JSONObject responseJSON = new JSONObject(response);
//// responseStatus = responseJSON.getString("status");
//// if(responseStatus.equalsIgnoreCase("ok")) {
//// System.out.println("Registration Success!");
//// } else if(responseStatus.equalsIgnoreCase("fail")) {
//// String reason = responseJSON.getString("description");
//// System.out.println("Registration fail, " + reason);
//// }
//// System.out.println();
//// } while(!responseStatus.equalsIgnoreCase("ok"));
////
//// // Test Login
//// do {
//// System.out.println("Login");
//// System.out.print("Username : "); username = inFromUser.readLine();
//// System.out.print("Password : "); password = inFromUser.readLine();
//// String toSend = loginJSON(username, password).toString();
////
//// outToServer.writeBytes(toSend + '\n');
////
//// String response = inFromServer.readLine();
//// JSONObject responseJSON = new JSONObject(response);
//// responseStatus = responseJSON.getString("status");
//// if(responseStatus.equalsIgnoreCase("ok")) {
//// System.out.println("Login Success!");
//// System.out.println("Token : " + responseJSON.getString("token"));
//// token = responseJSON.getString("token");
//// } else if(responseStatus.equalsIgnoreCase("fail")) {
//// String reason = responseJSON.getString("description");
//// System.out.println("Login fail, " + reason);
//// }
//// System.out.println();
//// } while(!responseStatus.equalsIgnoreCase("ok"));
////
//// // Test Inventory
//// do {
//// do {
//// System.out.print("Command : "); command = inFromUser.readLine();
//// } while(!command.equalsIgnoreCase("inventory") && !command.equalsIgnoreCase("exit"));
////
//// if(command.equalsIgnoreCase("inventory")) {
//// String toSend = inventoryJSON(token).toString();
////
//// outToServer.writeBytes(toSend + '\n');
////
//// String response = inFromServer.readLine();
//// JSONObject responseJSON = new JSONObject(response);
//// responseStatus = responseJSON.getString("status");
//// if(responseStatus.equalsIgnoreCase("ok")) {
//// System.out.println("Your Inventory : ");
//// List inventory = new ArrayList<Integer>();
//// JSONArray jsonarray = responseJSON.getJSONArray("inventory");
//// for(int i=0; i<jsonarray.length(); i++) {
//// inventory.add(jsonarray.getInt(i));
//// }
//// printItemList(inventory);
//// } else if(responseStatus.equalsIgnoreCase("error")) {
//// System.out.println("Error opening inventory");
//// }
//// System.out.println();
//// }
//// } while(!command.equalsIgnoreCase("exit"));
////
//// // Test Mix Item
//// do {
//// System.out.println("Mix Item");
//// System.out.print("Item 1 ID : "); int id1 = Integer.parseInt(inFromUser.readLine());
//// System.out.print("Item 2 ID : "); int id2 = Integer.parseInt(inFromUser.readLine());
//// String toSend = mixitemJSON(token, id1, id2).toString();
////
//// outToServer.writeBytes(toSend + '\n');
////
//// String response = inFromServer.readLine();
//// JSONObject responseJSON = new JSONObject(response);
//// responseStatus = responseJSON.getString("status");
//// if(responseStatus.equalsIgnoreCase("ok")) {
//// System.out.println("Mix item succeded, your new item id : " + responseJSON.getInt("item"));
//// } else if(responseStatus.equalsIgnoreCase("fail")) {
//// System.out.println("Failed to mix item, " + responseJSON.getString("description"));
//// } else if(responseStatus.equalsIgnoreCase("error")) {
//// System.out.println("Error mixing item");
//// }
//// System.out.println();
//// } while(true);
//// } while(!command.equalsIgnoreCase("exit"));
//
// JSONObject response = client.login("ayam", "ayam");
// if(response.getString("status").equals("ok")) {
// client.token = response.getString("token");
// client.x=response.getInt("x");
// client.y=response.getInt("y");
// }
// System.out.println(response.toString());
//
// response = client.map(client.token);
// System.out.println(response.toString());
//
// response = client.field(client.token);
// System.out.println(response.toString());
//
// response = client.offer(client.token, 0, 1, 7, 3);
// System.out.println(response.toString());
// }
>>>>>>> 2e2ad538abfe623e38cc24be02c48f5ad2ee0768
//
}
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