Commit 26a2f123 authored by Darwin's avatar Darwin
Browse files

coba fix error

parent 0f6ffd33
......@@ -8,9 +8,11 @@ src/server/nbactions.xml
src/server/nb-configuration.xml
src/client/nbproject/private/private.properties
src/client/nbproject/private/private.xml
src/client/build/*
src/client/build/
src/client/nbbuild/
src/client/nbdist/
src/client/nbactions.xml
src/client/nb-configuration.xml
src/client/build/classes/tcpclient/LoginPage.class
src/client/build/classes/tcpclient/TCPClient.class
.nb-gradle/
\ No newline at end of file
......@@ -1421,15 +1421,247 @@
<Layout>
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<EmptySpace min="0" pref="908" max="32767" attributes="0"/>
<Group type="102" alignment="0" attributes="0">
<Component id="FindItem" min="-2" max="-2" attributes="0"/>
<EmptySpace min="0" pref="146" max="32767" attributes="0"/>
</Group>
<Group type="102" attributes="0">
<EmptySpace min="188" pref="188" max="-2" attributes="0"/>
<Component id="FindIcon" min="-2" max="-2" attributes="0"/>
<EmptySpace max="32767" attributes="0"/>
<Component id="Find" min="-2" max="-2" attributes="0"/>
<EmptySpace min="-2" pref="192" max="-2" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
<DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0">
<EmptySpace min="0" pref="540" max="32767" attributes="0"/>
<Group type="102" alignment="0" attributes="0">
<Component id="FindItem" min="-2" max="-2" attributes="0"/>
<EmptySpace type="unrelated" max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Component id="FindIcon" min="-2" max="-2" attributes="0"/>
<Component id="Find" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace min="0" pref="165" max="32767" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
</Layout>
<SubComponents>
<Container class="javax.swing.JPanel" name="FindItem">
<Layout>
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="1" attributes="0">
<Component id="FindIncense" alignment="1" min="-2" pref="134" max="-2" attributes="0"/>
<Component id="FindHoney" alignment="1" min="-2" pref="134" max="-2" attributes="0"/>
</Group>
<EmptySpace type="separate" max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" max="-2" attributes="0">
<Component id="FindHerbs" alignment="0" min="-2" pref="134" max="-2" attributes="0"/>
<Component id="FindGems" alignment="0" min="-2" pref="134" max="-2" attributes="0"/>
</Group>
<EmptySpace type="separate" max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" max="-2" attributes="0">
<Component id="FindClay" alignment="0" min="-2" pref="134" max="-2" attributes="0"/>
<Component id="FindLifeElixir" alignment="0" min="-2" pref="134" max="-2" attributes="0"/>
</Group>
<EmptySpace type="separate" max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" max="-2" attributes="0">
<Component id="FindMineral" alignment="0" min="-2" pref="134" max="-2" attributes="0"/>
<Component id="FindManaCrystal" alignment="0" min="-2" pref="134" max="-2" attributes="0"/>
</Group>
<EmptySpace type="separate" max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" max="-2" attributes="0">
<Component id="FindPotion" alignment="0" min="-2" pref="134" max="-2" attributes="0"/>
<Component id="FindPhilosopherStone" alignment="0" min="-2" pref="134" max="-2" attributes="0"/>
</Group>
<EmptySpace max="32767" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
<DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Component id="FindPotion" alignment="0" min="-2" max="-2" attributes="0"/>
<Component id="FindHoney" alignment="0" min="-2" max="-2" attributes="0"/>
<Component id="FindHerbs" alignment="0" min="-2" max="-2" attributes="0"/>
<Component id="FindClay" alignment="0" min="-2" pref="155" max="-2" attributes="0"/>
<Component id="FindMineral" alignment="0" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace type="separate" max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Component id="FindIncense" alignment="0" min="-2" max="-2" attributes="0"/>
<Component id="FindGems" alignment="0" min="-2" max="-2" attributes="0"/>
<Component id="FindLifeElixir" alignment="0" min="-2" max="-2" attributes="0"/>
<Component id="FindManaCrystal" alignment="0" min="-2" max="-2" attributes="0"/>
<Component id="FindPhilosopherStone" alignment="0" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="32767" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
</Layout>
<SubComponents>
<Component class="javax.swing.JButton" name="FindHoney">
<Properties>
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
<Image iconType="3" name="/inventory/images/honey.PNG"/>
</Property>
<Property name="text" type="java.lang.String" value="jButton1"/>
<Property name="horizontalTextPosition" type="int" value="0"/>
<Property name="verticalTextPosition" type="int" value="3"/>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="FindHoneyActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JButton" name="FindHerbs">
<Properties>
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
<Image iconType="3" name="/inventory/images/herbs.PNG"/>
</Property>
<Property name="text" type="java.lang.String" value="jButton1"/>
<Property name="horizontalTextPosition" type="int" value="0"/>
<Property name="verticalTextPosition" type="int" value="3"/>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="FindHerbsActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JButton" name="FindClay">
<Properties>
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
<Image iconType="3" name="/inventory/images/clay.PNG"/>
</Property>
<Property name="text" type="java.lang.String" value="jButton1"/>
<Property name="horizontalTextPosition" type="int" value="0"/>
<Property name="verticalTextPosition" type="int" value="3"/>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="FindClayActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JButton" name="FindMineral">
<Properties>
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
<Image iconType="3" name="/inventory/images/mineral.PNG"/>
</Property>
<Property name="text" type="java.lang.String" value="jButton1"/>
<Property name="horizontalTextPosition" type="int" value="0"/>
<Property name="verticalTextPosition" type="int" value="3"/>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="FindMineralActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JButton" name="FindPotion">
<Properties>
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
<Image iconType="3" name="/inventory/images/potion.PNG"/>
</Property>
<Property name="text" type="java.lang.String" value="jButton1"/>
<Property name="horizontalTextPosition" type="int" value="0"/>
<Property name="verticalTextPosition" type="int" value="3"/>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="FindPotionActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JButton" name="FindPhilosopherStone">
<Properties>
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
<Image iconType="3" name="/inventory/images/stone.PNG"/>
</Property>
<Property name="text" type="java.lang.String" value="jButton1"/>
<Property name="horizontalTextPosition" type="int" value="0"/>
<Property name="verticalTextPosition" type="int" value="3"/>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="FindPhilosopherStoneActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JButton" name="FindManaCrystal">
<Properties>
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
<Image iconType="3" name="/inventory/images/manaCrystal.PNG"/>
</Property>
<Property name="text" type="java.lang.String" value="jButton1"/>
<Property name="horizontalTextPosition" type="int" value="0"/>
<Property name="verticalTextPosition" type="int" value="3"/>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="FindManaCrystalActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JButton" name="FindLifeElixir">
<Properties>
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
<Image iconType="3" name="/inventory/images/lifeElixir.PNG"/>
</Property>
<Property name="text" type="java.lang.String" value="jButton1"/>
<Property name="horizontalTextPosition" type="int" value="0"/>
<Property name="verticalTextPosition" type="int" value="3"/>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="FindLifeElixirActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JButton" name="FindGems">
<Properties>
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
<Image iconType="3" name="/inventory/images/gems.PNG"/>
</Property>
<Property name="text" type="java.lang.String" value="jButton1"/>
<Property name="horizontalTextPosition" type="int" value="0"/>
<Property name="verticalTextPosition" type="int" value="3"/>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="FindGemsActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JButton" name="FindIncense">
<Properties>
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
<Image iconType="3" name="/inventory/images/incense.PNG"/>
</Property>
<Property name="text" type="java.lang.String" value="jButton1"/>
<Property name="horizontalTextPosition" type="int" value="0"/>
<Property name="verticalTextPosition" type="int" value="3"/>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="FindIncenseActionPerformed"/>
</Events>
</Component>
</SubComponents>
</Container>
<Component class="javax.swing.JButton" name="FindIcon">
<Properties>
<Property name="text" type="java.lang.String" value="Item"/>
<Property name="horizontalTextPosition" type="int" value="0"/>
<Property name="verticalTextPosition" type="int" value="1"/>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="FindIconActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JButton" name="Find">
<Properties>
<Property name="text" type="java.lang.String" value="Find"/>
<Property name="horizontalTextPosition" type="int" value="0"/>
<Property name="verticalTextPosition" type="int" value="1"/>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="FindActionPerformed"/>
</Events>
</Component>
</SubComponents>
</Container>
<Container class="javax.swing.JPanel" name="tradeitemPanel">
<Constraints>
......
......@@ -35,6 +35,7 @@ public class MainPage extends javax.swing.JFrame {
private int MixItem2;
private int OfferedItemId;
private int DemandedItemId;
private int FindId;
public MainPage() {
......@@ -141,6 +142,19 @@ public class MainPage extends javax.swing.JFrame {
DemandedAmount = new javax.swing.JSpinner();
jLabel1 = new javax.swing.JLabel();
finditemPanel = new javax.swing.JPanel();
FindItem = new javax.swing.JPanel();
FindHoney = new javax.swing.JButton();
FindHerbs = new javax.swing.JButton();
FindClay = new javax.swing.JButton();
FindMineral = new javax.swing.JButton();
FindPotion = new javax.swing.JButton();
FindPhilosopherStone = new javax.swing.JButton();
FindManaCrystal = new javax.swing.JButton();
FindLifeElixir = new javax.swing.JButton();
FindGems = new javax.swing.JButton();
FindIncense = new javax.swing.JButton();
FindIcon = new javax.swing.JButton();
Find = new javax.swing.JButton();
tradeitemPanel = new javax.swing.JPanel();
MenuPanel = new javax.swing.JPanel();
LogoutMenuButton = new javax.swing.JButton();
......@@ -1085,15 +1099,194 @@ public class MainPage extends javax.swing.JFrame {
MainPanel.add(offerPanel, "OfferCard");
FindHoney.setIcon(new javax.swing.ImageIcon(getClass().getResource("/inventory/images/honey.PNG"))); // NOI18N
FindHoney.setText("jButton1");
FindHoney.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
FindHoney.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
FindHoney.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
FindHoneyActionPerformed(evt);
}
});
FindHerbs.setIcon(new javax.swing.ImageIcon(getClass().getResource("/inventory/images/herbs.PNG"))); // NOI18N
FindHerbs.setText("jButton1");
FindHerbs.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
FindHerbs.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
FindHerbs.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
FindHerbsActionPerformed(evt);
}
});
FindClay.setIcon(new javax.swing.ImageIcon(getClass().getResource("/inventory/images/clay.PNG"))); // NOI18N
FindClay.setText("jButton1");
FindClay.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
FindClay.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
FindClay.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
FindClayActionPerformed(evt);
}
});
FindMineral.setIcon(new javax.swing.ImageIcon(getClass().getResource("/inventory/images/mineral.PNG"))); // NOI18N
FindMineral.setText("jButton1");
FindMineral.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
FindMineral.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
FindMineral.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
FindMineralActionPerformed(evt);
}
});
FindPotion.setIcon(new javax.swing.ImageIcon(getClass().getResource("/inventory/images/potion.PNG"))); // NOI18N
FindPotion.setText("jButton1");
FindPotion.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
FindPotion.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
FindPotion.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
FindPotionActionPerformed(evt);
}
});
FindPhilosopherStone.setIcon(new javax.swing.ImageIcon(getClass().getResource("/inventory/images/stone.PNG"))); // NOI18N
FindPhilosopherStone.setText("jButton1");
FindPhilosopherStone.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
FindPhilosopherStone.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
FindPhilosopherStone.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
FindPhilosopherStoneActionPerformed(evt);
}
});
FindManaCrystal.setIcon(new javax.swing.ImageIcon(getClass().getResource("/inventory/images/manaCrystal.PNG"))); // NOI18N
FindManaCrystal.setText("jButton1");
FindManaCrystal.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
FindManaCrystal.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
FindManaCrystal.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
FindManaCrystalActionPerformed(evt);
}
});
FindLifeElixir.setIcon(new javax.swing.ImageIcon(getClass().getResource("/inventory/images/lifeElixir.PNG"))); // NOI18N
FindLifeElixir.setText("jButton1");
FindLifeElixir.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
FindLifeElixir.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
FindLifeElixir.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
FindLifeElixirActionPerformed(evt);
}
});
FindGems.setIcon(new javax.swing.ImageIcon(getClass().getResource("/inventory/images/gems.PNG"))); // NOI18N
FindGems.setText("jButton1");
FindGems.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
FindGems.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
FindGems.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
FindGemsActionPerformed(evt);
}
});
FindIncense.setIcon(new javax.swing.ImageIcon(getClass().getResource("/inventory/images/incense.PNG"))); // NOI18N
FindIncense.setText("jButton1");
FindIncense.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
FindIncense.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
FindIncense.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
FindIncenseActionPerformed(evt);
}
});
javax.swing.GroupLayout FindItemLayout = new javax.swing.GroupLayout(FindItem);
FindItem.setLayout(FindItemLayout);
FindItemLayout.setHorizontalGroup(
FindItemLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(FindItemLayout.createSequentialGroup()
.addContainerGap()
.addGroup(FindItemLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(FindIncense, javax.swing.GroupLayout.PREFERRED_SIZE, 134, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(FindHoney, javax.swing.GroupLayout.PREFERRED_SIZE, 134, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(18, 18, 18)
.addGroup(FindItemLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(FindHerbs, javax.swing.GroupLayout.PREFERRED_SIZE, 134, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(FindGems, javax.swing.GroupLayout.PREFERRED_SIZE, 134, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(18, 18, 18)
.addGroup(FindItemLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(FindClay, javax.swing.GroupLayout.PREFERRED_SIZE, 134, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(FindLifeElixir, javax.swing.GroupLayout.PREFERRED_SIZE, 134, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(18, 18, 18)
.addGroup(FindItemLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(FindMineral, javax.swing.GroupLayout.PREFERRED_SIZE, 134, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(FindManaCrystal, javax.swing.GroupLayout.PREFERRED_SIZE, 134, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(18, 18, 18)
.addGroup(FindItemLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(FindPotion, javax.swing.GroupLayout.PREFERRED_SIZE, 134, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(FindPhilosopherStone, javax.swing.GroupLayout.PREFERRED_SIZE, 134, javax.swing.GroupLayout.PREFERRED_SIZE))
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
FindItemLayout.setVerticalGroup(
FindItemLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(FindItemLayout.createSequentialGroup()
.addContainerGap()
.addGroup(FindItemLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(FindPotion)
.addComponent(FindHoney)
.addComponent(FindHerbs)
.addComponent(FindClay, javax.swing.GroupLayout.PREFERRED_SIZE, 155, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(FindMineral))
.addGap(18, 18, 18)
.addGroup(FindItemLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(FindIncense)
.addComponent(FindGems)
.addComponent(FindLifeElixir)
.addComponent(FindManaCrystal)
.addComponent(FindPhilosopherStone))
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
FindIcon.setText("Item");
FindIcon.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
FindIcon.setVerticalTextPosition(javax.swing.SwingConstants.TOP);
FindIcon.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
FindIconActionPerformed(evt);
}
});
Find.setText("Find");
Find.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
Find.setVerticalTextPosition(javax.swing.SwingConstants.TOP);
Find.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
FindActionPerformed(evt);
}
});
javax.swing.GroupLayout finditemPanelLayout = new javax.swing.GroupLayout(finditemPanel);
finditemPanel.setLayout(finditemPanelLayout);
finditemPanelLayout.setHorizontalGroup(
finditemPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 908, Short.MAX_VALUE)
.addGroup(finditemPanelLayout.createSequentialGroup()
.addComponent(FindItem, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(0, 146, Short.MAX_VALUE))
.addGroup(finditemPanelLayout.createSequentialGroup()
.addGap(188, 188, 188)
.addComponent(FindIcon)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(Find)
.addGap(192, 192, 192))
);
finditemPanelLayout.setVerticalGroup(
finditemPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 540, Short.MAX_VALUE)
.addGroup(finditemPanelLayout.createSequentialGroup()
.addComponent(FindItem, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addGroup(finditemPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(FindIcon)
.addComponent(Find))
.addGap(0, 165, Short.MAX_VALUE))
);
MainPanel.add(finditemPanel, "FindItemCard");
......@@ -1846,6 +2039,87 @@ public class MainPage extends javax.swing.JFrame {
}
}//GEN-LAST:event_MakeOfferActionPerformed
private void FindHoneyActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_FindHoneyActionPerformed
// TODO add your handling code here:
FindIcon.setIcon(HoneyIcon.getIcon());
FindId = 0;
}//GEN-LAST:event_FindHoneyActionPerformed
private void FindHerbsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_FindHerbsActionPerformed
// TODO add your handling code here:
FindIcon.setIcon(HerbsIcon.getIcon());
FindId=1;
}//GEN-LAST:event_FindHerbsActionPerformed
private void FindClayActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_FindClayActionPerformed
// TODO add your handling code here:
FindIcon.setIcon(ClayIcon.getIcon());
FindId=2;
}//GEN-LAST:event_FindClayActionPerformed
private void FindMineralActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_FindMineralActionPerformed
// TODO add your handling code here:
FindIcon.setIcon(MineralIcon.getIcon());
FindId=3;
}//GEN-LAST:event_FindMineralActionPerformed
private void FindPotionActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_FindPotionActionPerformed
// TODO add your handling code here:
FindIcon.setIcon(PotionIcon.getIcon());
FindId=4;
}//GEN-LAST:event_FindPotionActionPerformed
private void FindPhilosopherStoneActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_FindPhilosopherStoneActionPerformed
// TODO add your handling code here:
FindIcon.setIcon(StoneIcon.getIcon());
FindId=9;
}//GEN-LAST:event_FindPhilosopherStoneActionPerformed
private void FindManaCrystalActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_FindManaCrystalActionPerformed
// TODO add your handling code here:
FindIcon.setIcon(ManaCrystalIcon.getIcon());
FindId=8;
}//GEN-LAST:event_FindManaCrystalActionPerformed
private void FindLifeElixirActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_FindLifeElixirActionPerformed
// TODO add your handling code here:
FindIcon.setIcon(LifeElixirIcon.getIcon());
FindId=7;
}//GEN-LAST:event_FindLifeElixirActionPerformed
private void FindGemsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_FindGemsActionPerformed
// TODO add your handling code here:
FindIcon.setIcon(GemsIcon.getIcon());
FindId=6;
}//GEN-LAST:event_FindGemsActionPerformed
private void FindIncenseActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_FindIncenseActionPerformed
// TODO add your handling code here:
FindIcon.setIcon(IncenseIcon.getIcon());
FindId=5;
}//GEN-LAST:event_FindIncenseActionPerformed
private void FindIconActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_FindIconActionPerformed
// TODO add your handling code here:
FindIcon.setIcon(null);
FindId=-1;
}//GEN-LAST:event_FindIconActionPerformed
private void FindActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_FindActionPerformed
// TODO add your handling code here:
try {
//JSONObject response = client.sendFind(client.token,FindId);
/*if(response.get("status").equals("ok")) {
CardLayout cl = (CardLayout) MainPanel.getLayout();
cl.show(MainPanel, "TradeItemCard");
}*/
}
catch(Exception e) {
e.printStackTrace();