Commit 6ee3636e authored by Stephen's avatar Stephen
Browse files

Merged

parents 4f990875 e17fbd95
......@@ -56,7 +56,7 @@ javadoc.splitindex=true
javadoc.use=true
javadoc.version=false
javadoc.windowtitle=
main.class=tcpclient.LoginPage
main.class=tcpclient.MainPage
manifest.file=manifest.mf
meta.inf.dir=${src.dir}/META-INF
mkdist.disabled=false
......
......@@ -281,43 +281,43 @@ public class LoginPage extends javax.swing.JFrame {
/**
* @param args the command line arguments
*/
public static void main(String args[]) {
/* Set the Nimbus look and feel */
//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
/* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
* For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
*/
try {
for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
if ("Nimbus".equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
break;
}
}
} catch (ClassNotFoundException ex) {
java.util.logging.Logger.getLogger(LoginPage.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (InstantiationException ex) {
java.util.logging.Logger.getLogger(LoginPage.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (IllegalAccessException ex) {
java.util.logging.Logger.getLogger(LoginPage.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {
java.util.logging.Logger.getLogger(LoginPage.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
}
//</editor-fold>
/* Create and display the form */
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
LoginPage LP=new LoginPage();
LP.setVisible(true);
}
});
}
// public static void main(String args[]) {
// /* Set the Nimbus look and feel */
// //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
// /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
// * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
// */
// try {
// for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
// if ("Nimbus".equals(info.getName())) {
// javax.swing.UIManager.setLookAndFeel(info.getClassName());
// break;
// }
// }
// } catch (ClassNotFoundException ex) {
// java.util.logging.Logger.getLogger(LoginPage.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
// } catch (InstantiationException ex) {
// java.util.logging.Logger.getLogger(LoginPage.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
// } catch (IllegalAccessException ex) {
// java.util.logging.Logger.getLogger(LoginPage.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
// } catch (javax.swing.UnsupportedLookAndFeelException ex) {
// java.util.logging.Logger.getLogger(LoginPage.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
// }
// //</editor-fold>
//
// /* Create and display the form */
// java.awt.EventQueue.invokeLater(new Runnable() {
// public void run() {
// LoginPage LP=new LoginPage();
// LP.setVisible(true);
//
//
//
//
//
// }
// });
// }
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JLabel backLabel;
......
<?xml version="1.0" encoding="UTF-8" ?>
<Form version="1.3" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JFrameFormInfo">
<Form version="1.5" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JFrameFormInfo">
<Properties>
<Property name="defaultCloseOperation" type="int" value="3"/>
</Properties>
......@@ -120,8 +120,14 @@
</Properties>
</Component>
<Component class="javax.swing.JTextField" name="ipaddressTextField">
<Properties>
<Property name="text" type="java.lang.String" value="localhost"/>
</Properties>
</Component>
<Component class="javax.swing.JTextField" name="portTextField">
<Properties>
<Property name="text" type="java.lang.String" value="6789"/>
</Properties>
</Component>
<Component class="javax.swing.JButton" name="connectButton">
<Properties>
......@@ -212,8 +218,14 @@
</Properties>
</Component>
<Component class="javax.swing.JTextField" name="usernameLoginTextField">
<Properties>
<Property name="text" type="java.lang.String" value="sg"/>
</Properties>
</Component>
<Component class="javax.swing.JPasswordField" name="passwordLoginField">
<Properties>
<Property name="text" type="java.lang.String" value="sg"/>
</Properties>
</Component>
<Component class="javax.swing.JButton" name="loginButton">
<Properties>
......@@ -326,28 +338,163 @@
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<EmptySpace min="-2" pref="81" max="-2" attributes="0"/>
<Component id="jLabel3" min="-2" max="-2" attributes="0"/>
<EmptySpace pref="705" max="32767" attributes="0"/>
<EmptySpace pref="18" max="32767" attributes="0"/>
<Component id="playerPanel" min="-2" pref="513" max="-2" attributes="0"/>
<EmptySpace min="-2" pref="89" max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Component id="currenttimeLabel" min="-2" max="-2" attributes="0"/>
<Component id="timeLabel" min="-2" max="-2" attributes="0"/>
<Component id="mapLabel" alignment="0" min="-2" max="-2" attributes="0"/>
<Component id="positionLabel" alignment="0" min="-2" max="-2" attributes="0"/>
<Group type="102" alignment="0" attributes="0">
<EmptySpace pref="12" max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" max="-2" attributes="0">
<Component id="moveButton" max="32767" attributes="0"/>
<Component id="xpositionTextField" min="-2" pref="59" max="-2" attributes="0"/>
</Group>
<EmptySpace min="-2" pref="34" max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" max="-2" attributes="0">
<Component id="ypositionTextField" max="32767" attributes="0"/>
<Component id="fieldButton" min="-2" max="-2" attributes="0"/>
</Group>
</Group>
</Group>
<EmptySpace min="-2" pref="40" max="-2" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
<DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<EmptySpace min="-2" pref="36" max="-2" attributes="0"/>
<Component id="jLabel3" min="-2" max="-2" attributes="0"/>
<EmptySpace pref="490" max="32767" attributes="0"/>
<EmptySpace min="-2" pref="38" max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Component id="playerPanel" alignment="1" pref="491" max="32767" attributes="0"/>
<Group type="102" alignment="0" attributes="0">
<Component id="mapLabel" min="-2" max="-2" attributes="0"/>
<EmptySpace type="unrelated" max="-2" attributes="0"/>
<Component id="positionLabel" min="-2" max="-2" attributes="0"/>
<EmptySpace type="separate" max="-2" attributes="0"/>
<Component id="timeLabel" min="-2" max="-2" attributes="0"/>
<EmptySpace min="-2" pref="28" max="-2" attributes="0"/>
<Component id="currenttimeLabel" min="-2" max="-2" attributes="0"/>
<EmptySpace min="-2" pref="29" max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="xpositionTextField" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="ypositionTextField" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace type="unrelated" max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="moveButton" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="fieldButton" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace min="0" pref="295" max="32767" attributes="0"/>
</Group>
</Group>
<EmptySpace max="-2" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
</Layout>
<SubComponents>
<Component class="javax.swing.JLabel" name="jLabel3">
<Component class="javax.swing.JLabel" name="mapLabel">
<Properties>
<Property name="text" type="java.lang.String" value="Map"/>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="positionLabel">
<Properties>
<Property name="text" type="java.lang.String" value="Position"/>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="timeLabel">
<Properties>
<Property name="text" type="java.lang.String" value="jLabel3"/>
<Property name="text" type="java.lang.String" value="Time"/>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="currenttimeLabel">
<Properties>
<Property name="text" type="java.lang.String" value="Current Time"/>
</Properties>
</Component>
<Component class="javax.swing.JTextField" name="xpositionTextField">
</Component>
<Component class="javax.swing.JTextField" name="ypositionTextField">
</Component>
<Component class="javax.swing.JButton" name="moveButton">
<Properties>
<Property name="text" type="java.lang.String" value="Move"/>
</Properties>
</Component>
<Component class="javax.swing.JButton" name="fieldButton">
<Properties>
<Property name="text" type="java.lang.String" value="Field"/>
</Properties>
</Component>
<Container class="javax.swing.JPanel" name="playerPanel">
<Properties>
<Property name="autoscrolls" type="boolean" value="true"/>
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[584, 10]"/>
</Property>
</Properties>
<Layout>
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<Component id="mapScrollPane" alignment="0" pref="513" max="32767" attributes="0"/>
</Group>
</DimensionLayout>
<DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0">
<Component id="mapScrollPane" alignment="1" max="32767" attributes="0"/>
</Group>
</DimensionLayout>
</Layout>
<SubComponents>
<Container class="javax.swing.JScrollPane" name="mapScrollPane">
<Properties>
<Property name="autoscrolls" type="boolean" value="true"/>
</Properties>
<AuxValues>
<AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/>
</AuxValues>
<Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
<SubComponents>
<Component class="javax.swing.JTable" name="mapTable">
<Properties>
<Property name="model" type="javax.swing.table.TableModel" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
<Connection code="mapModel" type="code"/>
</Property>
<Property name="columnModel" type="javax.swing.table.TableColumnModel" editor="org.netbeans.modules.form.editors2.TableColumnModelEditor">
<TableColumnModel selectionModel="0"/>
</Property>
<Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor">
<Color id="Default Cursor"/>
</Property>
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="null"/>
</Property>
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
<Connection code=" mapTable.size()&#xd;&#xa;" type="code"/>
</Property>
<Property name="name" type="java.lang.String" value="" noResource="true"/>
<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.RADConnectionPropertyEditor">
<Connection code="null" type="code"/>
</Property>
<Property name="updateSelectionOnSort" type="boolean" value="false"/>
</Properties>
<AccessibilityProperties>
<Property name="AccessibleContext.accessibleDescription" type="java.lang.String" value=""/>
</AccessibilityProperties>
</Component>
</SubComponents>
</Container>
</SubComponents>
</Container>
</SubComponents>
</Container>
<Container class="javax.swing.JPanel" name="inventoryPanel">
......@@ -437,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"/>
......
......@@ -3,9 +3,20 @@ package tcpclient;
import java.awt.CardLayout;
import java.io.IOException;
import java.text.DateFormat;
import java.util.Date;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.ImageIcon;
import javax.swing.JOptionPane;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.table.AbstractTableModel;
import javax.swing.table.DefaultTableModel;
import javax.swing.table.TableColumn;
import javax.swing.table.TableColumnModel;
import javax.swing.table.TableModel;
import org.json.JSONArray;
import org.json.JSONObject;
......@@ -14,10 +25,14 @@ public class MainPage extends javax.swing.JFrame {
//atribut
private TCPClient client;
private TableModel mapModel;
public MainPage() {
mapModel=new MapTableModel();
initComponents();
//mapTable
MenuPanel.setVisible(false);
}
......@@ -53,7 +68,17 @@ public class MainPage extends javax.swing.JFrame {
passwordRegisterField = new javax.swing.JPasswordField();
registerButton = new javax.swing.JButton();
mapPanel = new javax.swing.JPanel();
jLabel3 = new javax.swing.JLabel();
mapLabel = new javax.swing.JLabel();
positionLabel = new javax.swing.JLabel();
timeLabel = new javax.swing.JLabel();
currenttimeLabel = new javax.swing.JLabel();
xpositionTextField = new javax.swing.JTextField();
ypositionTextField = new javax.swing.JTextField();
moveButton = new javax.swing.JButton();
fieldButton = new javax.swing.JButton();
playerPanel = new javax.swing.JPanel();
mapScrollPane = new javax.swing.JScrollPane();
mapTable = new javax.swing.JTable();
inventoryPanel = new javax.swing.JPanel();
Level1Panel = new javax.swing.JPanel();
HoneyIcon = new javax.swing.JLabel();
......@@ -105,6 +130,10 @@ public class MainPage extends javax.swing.JFrame {
portLabel.setText("Port");
ipaddressTextField.setText("localhost");
portTextField.setText("6789");
connectButton.setText("Connect");
connectButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
......@@ -172,6 +201,10 @@ public class MainPage extends javax.swing.JFrame {
passwordLoginLabel.setText("Password");
usernameLoginTextField.setText("sg");
passwordLoginField.setText("sg");
loginButton.setText("Login");
loginButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
......@@ -281,23 +314,94 @@ public class MainPage extends javax.swing.JFrame {
MainPanel.add(registerPanel, "RegisterCard");
jLabel3.setText("jLabel3");
mapLabel.setText("Map");
positionLabel.setText("Position");
timeLabel.setText("Time");
currenttimeLabel.setText("Current Time");
moveButton.setText("Move");
fieldButton.setText("Field");
playerPanel.setAutoscrolls(true);
playerPanel.setPreferredSize(new java.awt.Dimension(584, 10));
mapScrollPane.setAutoscrolls(true);
mapTable.setModel(mapModel);
mapTable.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
mapTable.setMaximumSize(null);
mapTable.setMinimumSize( mapTable.size()
);
mapTable.setName(""); // NOI18N
mapTable.setPreferredSize(null);
mapTable.setTableHeader(null);
mapTable.setUpdateSelectionOnSort(false);
mapScrollPane.setViewportView(mapTable);
mapTable.getAccessibleContext().setAccessibleDescription("");
javax.swing.GroupLayout playerPanelLayout = new javax.swing.GroupLayout(playerPanel);
playerPanel.setLayout(playerPanelLayout);
playerPanelLayout.setHorizontalGroup(
playerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(mapScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 513, Short.MAX_VALUE)
);
playerPanelLayout.setVerticalGroup(
playerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(mapScrollPane, javax.swing.GroupLayout.Alignment.TRAILING)
);
javax.swing.GroupLayout mapPanelLayout = new javax.swing.GroupLayout(mapPanel);
mapPanel.setLayout(mapPanelLayout);
mapPanelLayout.setHorizontalGroup(
mapPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(mapPanelLayout.createSequentialGroup()
.addGap(81, 81, 81)
.addComponent(jLabel3)
.addContainerGap(705, Short.MAX_VALUE))
.addContainerGap(18, Short.MAX_VALUE)
.addComponent(playerPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 513, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(89, 89, 89)
.addGroup(mapPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(currenttimeLabel)
.addComponent(timeLabel)
.addComponent(mapLabel)
.addComponent(positionLabel)
.addGroup(mapPanelLayout.createSequentialGroup()
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 12, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGroup(mapPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(moveButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(xpositionTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 59, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(34, 34, 34)
.addGroup(mapPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(ypositionTextField)
.addComponent(fieldButton))))
.addGap(40, 40, 40))
);
mapPanelLayout.setVerticalGroup(
mapPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(mapPanelLayout.createSequentialGroup()
.addGap(36, 36, 36)
.addComponent(jLabel3)
.addContainerGap(490, Short.MAX_VALUE))
.addGap(38, 38, 38)
.addGroup(mapPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(playerPanel, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 491, Short.MAX_VALUE)
.addGroup(mapPanelLayout.createSequentialGroup()
.addComponent(mapLabel)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(positionLabel)
.addGap(18, 18, 18)
.addComponent(timeLabel)
.addGap(28, 28, 28)
.addComponent(currenttimeLabel)
.addGap(29, 29, 29)
.addGroup(mapPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(xpositionTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(ypositionTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addGroup(mapPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(moveButton)
.addComponent(fieldButton))
.addGap(0, 295, Short.MAX_VALUE)))
.addContainerGap())
);
MainPanel.add(mapPanel, "MapCard");
......@@ -352,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)
......@@ -872,15 +975,23 @@ public class MainPage extends javax.swing.JFrame {
client.y=response.getInt("y");
showMessage("Login success");
Long time = response.getLong("time");
positionLabel.setText("Position: ["+client.x+" , "+client.y+"]");
timeLabel.setText("Time: "+time);
currenttimeLabel.setText("Current Time: "+ new Date());
LoginAndRegisterPanel.setVisible(false);
NavBarPanel.setVisible(true);
LogoutMenuButton.setVisible(true);
generateMap();
//change to map
CardLayout cl = (CardLayout) MainPanel.getLayout();
cl.show(MainPanel, "MapCard");
} else {
showMessage(response.getString("description"));
}
......@@ -891,7 +1002,49 @@ public class MainPage extends javax.swing.JFrame {
}
}//GEN-LAST:event_loginButtonActionPerformed
//Generate Map
private void generateMap() {
System.out.println("masuk map");
JSONObject response;
try {
response = client.map();
if(response.getString("status").equals("ok")) {
String name = response.getString("name");
mapLabel.setText("Map: "+name);
int dimX=response.getInt("width");;
int dimY=response.getInt("height");
mapModel=new MapTableModel(dimX, dimY);
mapModel.setValueAt(null, client.x, client.y);
mapTable.setModel(mapModel);
mapTable.setRowHeight(100);
for (int i = 0; i < mapTable.getColumnModel().getColumnCount(); i++) {
TableColumn column = mapTable.getColumnModel().getColumn(i);
column.setPreferredWidth(100);
}
mapTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
mapTable.setPreferredScrollableViewportSize(mapTable.getPreferredSize());
mapTable.setTableHeader(null);
showMessage("Map load");
} else {
showMessage("Map Error. Try again later..");
}
} catch (Exception ex) {
showMessage("Server map does not respond. Please try again later..");
System.out.println("Map Exception");
Logger.getLogger(LoginPage.class.getName()).log(Level.SEVERE, null, ex);
}
System.out.println("keluar map");
}
/**
* @param args the command line arguments
*/
......@@ -965,34 +1118,46 @@ public class MainPage extends javax.swing.JFrame {
private javax.swing.JLabel StoneCount;
private javax.swing.JButton TradeBoxMenuButton;
private javax.swing.JButton connectButton;
private javax.swing.JLabel currenttimeLabel;