Advertisement
madcow344

m4dc0w344 wildy looter

Oct 23rd, 2011
563
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 18.69 KB | None | 0 0
  1. import java.awt.*;
  2. import java.awt.event.ActionEvent;
  3. import java.awt.event.ActionListener;
  4. import java.awt.event.ItemEvent;
  5. import java.awt.event.ItemListener;
  6. import java.awt.event.MouseEvent;
  7. import java.awt.event.MouseListener;
  8.  
  9. import javax.swing.GroupLayout;
  10. import javax.swing.JButton;
  11. import javax.swing.JComboBox;
  12. import javax.swing.JFrame;
  13. import javax.swing.JLabel;
  14. import javax.swing.JTextField;
  15. import javax.swing.LayoutStyle;
  16. import javax.swing.SwingConstants;
  17.  
  18. //import org.rsbot.client.RSItem;
  19. import org.rsbot.script.wrappers.RSItem;
  20. //import org.rsbot.client.RSPlayer;
  21. import org.rsbot.script.wrappers.RSPlayer;
  22. import org.rsbot.event.events.MessageEvent;
  23. import org.rsbot.event.listeners.MessageListener;
  24. import org.rsbot.event.listeners.PaintListener;
  25. import org.rsbot.script.Script;
  26. import org.rsbot.script.ScriptManifest;
  27. import org.rsbot.script.methods.Game;
  28. import org.rsbot.script.methods.Inventory;
  29. import org.rsbot.script.util.Timer;
  30. import org.rsbot.script.wrappers.RSArea;
  31. import org.rsbot.script.wrappers.RSComponent;
  32. import org.rsbot.script.wrappers.RSNPC;
  33. import org.rsbot.script.wrappers.RSObject;
  34. import org.rsbot.script.wrappers.RSTile;
  35. import org.rsbot.script.wrappers.RSTilePath;
  36. import org.rsbot.script.wrappers.RSGroundItem;
  37. import org.rsbot.script.wrappers.RSWeb;
  38. import javax.imageio.ImageIO;
  39. import java.io.IOException;
  40. import java.net.URL;
  41.  
  42. //End Imports
  43.  
  44.  
  45. @ScriptManifest
  46. (
  47.         authors = {"MD"},
  48.         version = 1.0,
  49.         description = "Loots any items you want in the wilderness.",
  50.         name = "a new Wilderness Looter (beta)"
  51. )
  52.  
  53. public class wildLooterBeta extends Script implements PaintListener, MessageListener
  54. {
  55.     //Global Variables
  56.     long startingTime = System.currentTimeMillis();
  57.     long millis = 0;
  58.     long hour = 0;
  59.     long minute = 0;
  60.     long second = 0;
  61.     long startTime = 0;
  62.     long lastHopTime = 0;
  63.     long lastWalkTime = 0;
  64.     long lastBankTime = 0;
  65.     long lastClickTime = 0;
  66.     long lastRotateTime = 0;
  67.    
  68.     int userItemChoice = 0;
  69.     int userItemStackLimit = 50;
  70.     int userItemLimit = 14;
  71.     int lastItemClicked = 0;
  72.     int inventoryGoldCount = 0;
  73.     int lastInventoryCount = 0;
  74.     int totalGoldCount = 0;
  75.     int oldGroundItemID = 0;
  76.    
  77.     boolean wasonscreen = false;
  78.     boolean ic = false;
  79.     boolean pickupall = false;
  80.    
  81.     String status = "";
  82.    
  83.     RSGroundItem oldGroundItem = null;
  84.     RSGroundItem newGroundItem = null;
  85.    
  86.     RSTile bankingTile = new RSTile (3092,3495,0);
  87.    
  88.     private final Color color1 = new Color(0, 0, 0, 100);
  89.     private final Color color2 = new Color(255,255,255);
  90.     private final Color color3 = new Color(255,255,255);
  91.     private final Color color5 = new Color(0, 0, 0);
  92.  
  93.     private final BasicStroke stroke1 = new BasicStroke(2);
  94.     private final Font font1 = new Font("Sylfaen", 1, 20);
  95.     private final Font font2 = new Font("Sylfaen", 0, 15);
  96.     private final Font font3 = new Font("Sylfaen", 1, 13);
  97.    
  98.     private Image getImage(String url)
  99.     {
  100.         try
  101.         {
  102.             return ImageIO.read(new URL(url));
  103.         } catch(IOException e) {
  104.             return null;
  105.         }
  106.     }
  107.    
  108.     //get pic of what u are looking up
  109.     private final Image im  = getImage("http://1.gravatar.com/avatar/927fa8b1a0fc8667d1bad14e1637d2c8?s=128&d=identicon&r=G");
  110.     private long lastCheckFunctionTime;
  111.     private boolean isTasking;
  112.     //End Global Variables
  113.     private long lastHeadToItemTime;
  114.     private RSItem ObjectClicked;
  115.     private boolean checkInvent;
  116.     WGUI Wgui = new WGUI();
  117.    
  118.     public boolean onStart()
  119.     {
  120.         log("Starting script..");
  121.         //iCountT.start();
  122.         mouse.setSpeed(7);
  123.         log("Starting script..");
  124.         Wgui.setVisible(true);
  125.         while(Wgui.isVisible())
  126.         {
  127.             sleep(3);
  128.         }
  129.         if(userItemChoice == 0)
  130.             pickupall = true;
  131.         return true;
  132.     }
  133.  
  134.     public int loop()
  135.     {
  136.         if(System.currentTimeMillis() - lastCheckFunctionTime > 5000 || isTasking() == true)
  137.         {
  138.             //log("-- part 1 --");
  139.             lastCheckFunctionTime = System.currentTimeMillis();
  140.             RSPlayer p = getMyPlayer();
  141.             isTasking = false;
  142.            
  143.             if(p.isInCombat())
  144.             {
  145.                 isTasking = true;
  146.                 runToBorder();
  147.                 if(atWall())
  148.                 {
  149.                     hopBorder();
  150.                     sleep(40);
  151.                     if(!isInWild())
  152.                     {
  153.                         walkTo(new RSTile (random(3068,3119),p.getLocation().getY(),p.getLocation().getZ()));
  154.                         sleep(5);
  155.                     }
  156.                 }
  157.             }
  158.             else
  159.             if(walking.getEnergy() <= 15)
  160.             {
  161.                 isTasking = true;
  162.                 status = "Resting until 100% (" + walking.getEnergy()+")";
  163.                 playerRest();
  164.             }
  165.             else
  166.             if(inventory.getCount() > userItemLimit || stackSizeOverLimit())
  167.             {
  168.                 isTasking = true;
  169.                 bankInventory();
  170.             }
  171.             else
  172.             if(!isOnWildSide())
  173.             {
  174.                 isTasking = true;
  175.                 runToWild();
  176.             }
  177.             if(isTasking == true)
  178.                 sleep(20);
  179.         }
  180.         else
  181.         {
  182.             //log("-- part 2 --");
  183.             isTasking = false;
  184.             RSGroundItem gi = null;
  185.             if(pickupall == true)
  186.             {
  187.                 gi = getClosestGroundItem();
  188.             }
  189.             else
  190.             {
  191.                 gi = getClosestItem();
  192.             }
  193.            
  194.             if(checkInvent == true && getTotalInventoryCount() > lastInventoryCount && oldGroundItemID > 0 && oldGroundItemID != 0)
  195.             {
  196.                 checkInvent = false;
  197.                 try
  198.                 {
  199.                     inventoryGoldCount = (inventoryGoldCount) + (grandExchange.lookup(oldGroundItemID).getGuidePrice()*oldGroundItem.getItem().getStackSize());
  200.                     lastInventoryCount = getTotalInventoryCount();
  201.                 }
  202.                 catch(Exception e)
  203.                 {
  204.                    
  205.                 }
  206.             }
  207.             if(gi != null)
  208.             {
  209.                 if(gi.isOnScreen())
  210.                 {
  211.                     wasonscreen = true;
  212.                     checkInvent = true;
  213.                     pickupGroundItem(gi);
  214.                 }
  215.                 else if(System.currentTimeMillis() - lastHeadToItemTime > 2000)
  216.                 {
  217.                     checkInvent = false;
  218.                     lastHeadToItemTime = System.currentTimeMillis();
  219.                     if(gi.getItem().getName() == null)
  220.                         status = "Heading to *FETCHING ITEM NAME*(" + gi.getItem().getStackSize() + ")";
  221.                     else
  222.                         status = "Heading to " + gi.getItem().getName() + "(" + gi.getItem().getStackSize() + ")";
  223.                    
  224.                     walkTo(gi.getLocation());
  225.                 }
  226.             }
  227.             if(wasonscreen == true)
  228.             {
  229.                 if(gi != null)
  230.                 {
  231.                     oldGroundItem = gi;
  232.                     oldGroundItemID = gi.getItem().getID();
  233.                     wasonscreen = false;
  234.                 }
  235.             }
  236.         }
  237.         if(System.currentTimeMillis() - lastRotateTime > random(10000,20000))
  238.         {
  239.             lastRotateTime = System.currentTimeMillis();
  240.             camera.setAngle(random(0,200));
  241.         }
  242.         if(menu.isOpen())
  243.             moveMouseFromMenu();
  244.            
  245.         return 1;
  246.     }
  247.    
  248.     public void onFinish()
  249.     {
  250.    
  251.     }
  252.    
  253.     public boolean isTasking()
  254.     {
  255.         return isTasking;
  256.     }
  257.  
  258.     public void moveMouseFromMenu()
  259.     {
  260.         Point b = menu.getLocation();
  261.         if(menu.isOpen())
  262.         {
  263.             int x = b.x;
  264.             int y = b.y;
  265.             if(random(0,2)==0)
  266.             {
  267.                 x = x+random(-20,-50);
  268.             }
  269.             else
  270.             {
  271.                 x = (x+218)+random(+20,+50);
  272.             }
  273.             if(random(0,2)==0)
  274.             {
  275.                 y = y+random(-20,-50);
  276.             }
  277.             else
  278.             {
  279.                 y = (y+menu.getSize()*17)+random(+20,+50);
  280.             }
  281.             mouse.move(x,y);
  282.             sleep(random(10,40));
  283.         }
  284.     }
  285.    
  286.     public void pickupGroundItem(RSGroundItem item)
  287.     {
  288.         RSTile itemLocation = item.getLocation();
  289.         String itemName = item.getItem().getName();
  290.         String pickUpMSG = itemName;
  291.         status = "Picking up " + itemName + " (" + item.getItem().getStackSize() +")";
  292.        
  293.         mouse.move(calc.tileToScreen(itemLocation));
  294.        
  295.         if(menu.getSize() > 2 && menu.getSize() <= 4)
  296.         {
  297.             if(menuHasAction("Take") && System.currentTimeMillis() - lastClickTime > 600)
  298.             {
  299.                 item.interact("Take");
  300.                 lastClickTime = System.currentTimeMillis();
  301.                 ObjectClicked = item.getItem();
  302.             }
  303.         }
  304.         else
  305.         {
  306.             if(menuHasAction("Take") && System.currentTimeMillis() - lastClickTime > 600)
  307.             {
  308.                 mouse.click(false);
  309.                 sleep(1,2);
  310.                 if(menu.contains("Take"))
  311.                 {
  312.                     menu.doAction("Take " + pickUpMSG);
  313.                     lastClickTime = System.currentTimeMillis();
  314.                     ObjectClicked = item.getItem();
  315.                 }
  316.             }
  317.         }
  318.     }
  319.    
  320.     public RSGroundItem getClosestGroundItem()
  321.     {
  322.         RSGroundItem[] it = groundItems.getAll();
  323.         RSGroundItem temp = null;
  324.         RSPlayer me = getMyPlayer();
  325.         int i =0; for(i=0; i<it.length; i++)
  326.         {
  327.             if(temp == null)
  328.             {
  329.                 temp = it[i];
  330.             }
  331.             else
  332.             if(calc.distanceBetween(it[i].getLocation(), me.getLocation()) < calc.distanceBetween(temp.getLocation(), me.getLocation()))
  333.             {
  334.                 if(it[i].getLocation().getY() >= 3523)
  335.                 {
  336.                     temp = it[i];
  337.                 }
  338.             }
  339.         }
  340.         return temp;
  341.     }
  342.    
  343.     public boolean menuHasAction(String a)
  344.     {
  345.         String[] men = menu.getActions();
  346.         int i = 0; for(i=0; i<men.length; i++)
  347.             if(men[i].contains(a))
  348.                 return true;
  349.        
  350.         return false;
  351.     }
  352.    
  353.     public boolean stackSizeOverLimit()
  354.     {
  355.         RSItem[] it = inventory.getItems();
  356.         int i = 0; for(i=0; i<28; i++)
  357.         {
  358.             if(it[i] != null && it[i].getID() != -1)
  359.             {
  360.                 if(it[i].getStackSize() > 1)
  361.                 {
  362.                     if(it[i].getStackSize() > userItemStackLimit)
  363.                         return true;
  364.                 }
  365.             }
  366.         }
  367.         return false;
  368.     }
  369.    
  370.    
  371.     public RSGroundItem getClosestItem()
  372.     {
  373.         RSGroundItem tempItem = null;
  374.        
  375.         tempItem = groundItems.getNearest(userItemChoice);
  376.        
  377.         if(tempItem!= null && tempItem.getLocation().getY() >= 3523)
  378.             return tempItem;
  379.        
  380.         return null;
  381.     }
  382.    
  383.     public boolean isInWild()
  384.     {
  385.         String iface = interfaces.getComponent(381,2).getText();
  386.         if(iface.contains("Level:"))
  387.             return true;
  388.         return false;
  389.     }
  390.    
  391.     public boolean isOnWildSide()
  392.     {
  393.         if(getMyPlayer().getLocation().getY() >= 3523)
  394.             return true;
  395.         return false;
  396.     }
  397.    
  398.     public int getTotalInventoryCount()
  399.     {
  400.         RSItem[] invent = inventory.getItems();
  401.         int icount = 0;
  402.         int i = 0; for(i=0;i<invent.length; i++)
  403.         {
  404.             if(invent[i].getID() != -1)
  405.             {
  406.                 if(invent[i].getStackSize() >= 2)
  407.                 {
  408.                     icount += invent[i].getStackSize();
  409.                 }
  410.                 else
  411.                 {
  412.                     icount++;
  413.                 }
  414.             }
  415.         }
  416.         return icount;
  417.     }
  418.    
  419.     public void playerRest()
  420.     {
  421.         if(!atWall())
  422.         {
  423.             status = "Heading to safety to rest.";
  424.             runToBorder();
  425.         }
  426.         else
  427.         {
  428.             walking.rest();
  429.             if(!walking.isRunEnabled())
  430.             {
  431.                 walking.setRun(true);
  432.                 sleep(2000);
  433.             }
  434.         }
  435.         if(walking.getEnergy() == 100)
  436.         {
  437.             isTasking = false;
  438.         }
  439.         else
  440.             isTasking = true;
  441.     }
  442.  
  443.    
  444.     public void runToBorder()
  445.     {
  446.         RSObject wall = objects.getNearest(1444);
  447.         if(wall != null)
  448.         {
  449.             if(!atWall())
  450.             {
  451.                 walkTo(wall.getLocation());
  452.             }
  453.         }
  454.         else
  455.         {
  456.             RSTile pl = getMyPlayer().getLocation();
  457.             RSTile tile = new RSTile (pl.getX(),3520,pl.getZ());
  458.             walkTo(tile);
  459.         }
  460.     }
  461.    
  462.     public void hopBorder()
  463.     {
  464.         status = "Hopping wall.";
  465.         RSObject wall = objects.getNearest(1444);
  466.         if(wall != null)
  467.         {
  468.             if(wall.isOnScreen())
  469.             {
  470.                 if(System.currentTimeMillis() - lastHopTime > 4000)
  471.                 {
  472.                     wall.interact("Cross Wilderness wall");
  473.                     lastHopTime = System.currentTimeMillis();
  474.                     isTasking = false;
  475.                     sleep(2000);
  476.                 }
  477.             }
  478.         }
  479.     }
  480.    
  481.     public boolean atWall()
  482.     {
  483.         RSObject wall = objects.getNearest(1444);
  484.         if(wall != null)
  485.             if(wall.isOnScreen())
  486.                 return true;
  487.         return false;
  488.     }
  489.    
  490.     public void bankInventory()
  491.     {
  492.         if(atWall() && isOnWildSide())
  493.         {
  494.             if(System.currentTimeMillis() - lastHopTime > 4000)
  495.             {
  496.                 hopBorder();
  497.                 lastHopTime = System.currentTimeMillis();
  498.             }
  499.         }
  500.         else
  501.         {
  502.             if(!isOnWildSide())
  503.             {
  504.                 RSNPC banker = npcs.getNearest(2759);
  505.                 if(banker != null && banker.isOnScreen() && System.currentTimeMillis() - lastBankTime > 4000)
  506.                 {
  507.                     status = "Banking everything in our inventory.";
  508.                     banker.interact("Bank Banker");
  509.                     int dist = (int) calc.distanceBetween(getMyPlayer().getLocation(), banker.getLocation());
  510.                     sleep(1000 * dist);
  511.                     bank.depositAll();
  512.                     bank.close();
  513.                     totalGoldCount += inventoryGoldCount;
  514.                     inventoryGoldCount = 0;
  515.                     lastInventoryCount = 0;
  516.                     lastBankTime = System.currentTimeMillis();
  517.                    
  518.                 }
  519.                 else
  520.                 {
  521.                         status = "Heading to a banker.";
  522.                         walkTo(bankingTile);
  523.                 }
  524.             }
  525.             else
  526.             {
  527.                 status = "Walking to the wall, bank time!";
  528.                 RSObject wall = objects.getNearest(1444);
  529.                 if(wall != null)
  530.                     walkTo(wall.getLocation());
  531.             }
  532.         }
  533.     }
  534.    
  535.     public void runToWild()
  536.     {
  537.         if(!isOnWildSide())
  538.         {
  539.             if(!atWall())
  540.             {
  541.                 runToBorder();
  542.             }
  543.             else
  544.             if(System.currentTimeMillis() - lastHopTime > 4000)
  545.             {
  546.                 hopBorder();
  547.                 lastHopTime = System.currentTimeMillis();
  548.             }
  549.         }
  550.     }
  551.    
  552.    
  553.     public void walkTo(RSTile tile)
  554.     {
  555.         if(tile != null && System.currentTimeMillis() - lastWalkTime > 1000) //&& !getMyPlayer().isMoving())
  556.         {
  557.             walking.walkTileMM(tile);
  558.             lastWalkTime = System.currentTimeMillis();
  559.         }
  560.     }
  561.    
  562.  
  563.     public void onRepaint(Graphics g1)
  564.     {
  565.         if (startTime == 0 && game.isLoggedIn())
  566.         {
  567.             startTime = System.currentTimeMillis();
  568.         }
  569.         float totalSec = 0;
  570.         long millis = System.currentTimeMillis() - startTime;
  571.         final long hours = millis / (1000 * 60 * 60);
  572.         millis -= hours * 1000 * 60 * 60;
  573.         final long minutes = millis / (1000 * 60);
  574.         millis -= minutes * 1000 * 60;
  575.         final long seconds = millis / 1000;
  576.         totalSec = hours * 3600 + minutes * 60 + seconds;
  577.        
  578.  
  579.         Graphics2D g = (Graphics2D) g1;
  580.         g.setColor(color1);
  581.         g.fillRoundRect(11, 12, 498, 112, 16, 16);
  582.         g.setColor(color2);
  583.         g.setStroke(stroke1);
  584.         g.drawRoundRect(11, 12, 498, 112, 16, 16);
  585.         g.setFont(font1);
  586.         g.setColor(color3);
  587.         g.drawString("      MD's Wilderness Looter", 22, 33);
  588.         g.setFont(font2);
  589.         g.drawString(String.format("RunTime: %02d:%02d:%02d", hours, minutes, seconds), 22, 55);
  590.         g.drawImage(im, 380, 1, null);
  591.         g.drawString("Inventory worth: " + inventoryGoldCount , 22, 75);
  592.         g.drawString("Money Made: " + totalGoldCount, 22, 95);
  593.  
  594.         g.drawString("Status: " + status,455 - status.length()*6,330);
  595.  
  596.     }
  597.    
  598.     public void messageReceived(MessageEvent message)
  599.     {
  600.     }
  601.    
  602.     public class WGUI extends JFrame {
  603.         public WGUI() {
  604.             initComponents();
  605.         }
  606.  
  607.         private void button1ActionPerformed(ActionEvent e)
  608.         {
  609.             // TODO add your code here
  610.             userItemChoice = Integer.parseInt(textField1.getText());
  611.             this.dispose();
  612.         }
  613.  
  614.         private void initComponents() {
  615.             // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents
  616.             // Generated using JFormDesigner Evaluation license - marc davis
  617.             button1 = new JButton();
  618.             textField1 = new JTextField();
  619.             label1 = new JLabel();
  620.             label2 = new JLabel();
  621.             label3 = new JLabel();
  622.             label4 = new JLabel();
  623.             label5 = new JLabel();
  624.             label6 = new JLabel();
  625.  
  626.             //======== this ========
  627.             setTitle("MD's Wilderness Looter Beta");
  628.             Container contentPane = getContentPane();
  629.  
  630.             //---- button1 ----
  631.             button1.setText("Start");
  632.             button1.addActionListener(new ActionListener() {
  633.                 @Override
  634.                 public void actionPerformed(ActionEvent e) {
  635.                     button1ActionPerformed(e);
  636.                 }
  637.             });
  638.  
  639.             //---- label1 ----
  640.             label1.setText("MD's Wilderness Looter Beta - Premium version comming soon!");
  641.  
  642.             //---- label2 ----
  643.             label2.setText("Fill in the box with your object's ID or if you want it to");
  644.  
  645.             //---- label3 ----
  646.             label3.setText("pick up anything, just leave it blank.");
  647.  
  648.             //---- label4 ----
  649.             label4.setText("__________________________________________________");
  650.  
  651.             //---- label5 ----
  652.             label5.setText("HOW TO:");
  653.  
  654.             //---- label6 ----
  655.             label6.setText("_________________________________________________");
  656.            
  657.             //---- textfield1 ----
  658.             textField1.setText("0");
  659.  
  660.             GroupLayout contentPaneLayout = new GroupLayout(contentPane);
  661.             contentPane.setLayout(contentPaneLayout);
  662.             contentPaneLayout.setHorizontalGroup(
  663.                 contentPaneLayout.createParallelGroup()
  664.                     .addGroup(contentPaneLayout.createSequentialGroup()
  665.                         .addGap(33, 33, 33)
  666.                         .addComponent(label2)
  667.                         .addContainerGap(37, Short.MAX_VALUE))
  668.                     .addGroup(contentPaneLayout.createSequentialGroup()
  669.                         .addGap(134, 134, 134)
  670.                         .addComponent(label5)
  671.                         .addContainerGap(147, Short.MAX_VALUE))
  672.                     .addGroup(GroupLayout.Alignment.TRAILING, contentPaneLayout.createSequentialGroup()
  673.                         .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
  674.                         .addComponent(label6)
  675.                         .addGap(161, 161, 161))
  676.                     .addGroup(contentPaneLayout.createSequentialGroup()
  677.                         .addContainerGap()
  678.                         .addComponent(label1)
  679.                         .addContainerGap(157, Short.MAX_VALUE))
  680.                     .addGroup(contentPaneLayout.createSequentialGroup()
  681.                         .addContainerGap()
  682.                         .addComponent(label4)
  683.                         .addContainerGap(155, Short.MAX_VALUE))
  684.                     .addGroup(contentPaneLayout.createSequentialGroup()
  685.                         .addGap(76, 76, 76)
  686.                         .addComponent(label3)
  687.                         .addContainerGap(216, Short.MAX_VALUE))
  688.                     .addGroup(contentPaneLayout.createSequentialGroup()
  689.                         .addGap(141, 141, 141)
  690.                         .addComponent(textField1, GroupLayout.PREFERRED_SIZE, 26, GroupLayout.PREFERRED_SIZE)
  691.                         .addContainerGap(298, Short.MAX_VALUE))
  692.                     .addGroup(contentPaneLayout.createSequentialGroup()
  693.                         .addGap(126, 126, 126)
  694.                         .addComponent(button1)
  695.                         .addContainerGap(282, Short.MAX_VALUE))
  696.             );
  697.             contentPaneLayout.setVerticalGroup(
  698.                 contentPaneLayout.createParallelGroup()
  699.                     .addGroup(contentPaneLayout.createSequentialGroup()
  700.                         .addGap(6, 6, 6)
  701.                         .addComponent(label1)
  702.                         .addGap(5, 5, 5)
  703.                         .addComponent(label4)
  704.                         .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)
  705.                         .addComponent(label5)
  706.                         .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)
  707.                         .addComponent(label2)
  708.                         .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
  709.                         .addComponent(label3, GroupLayout.PREFERRED_SIZE, 14, GroupLayout.PREFERRED_SIZE)
  710.                         .addGap(11, 11, 11)
  711.                         .addComponent(label6)
  712.                         .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
  713.                         .addComponent(textField1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
  714.                         .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)
  715.                         .addComponent(button1)
  716.                         .addGap(72, 72, 72))
  717.             );
  718.             pack();
  719.             setLocationRelativeTo(getOwner());
  720.             // JFormDesigner - End of component initialization  //GEN-END:initComponents
  721.         }
  722.  
  723.         // JFormDesigner - Variables declaration - DO NOT MODIFY  //GEN-BEGIN:variables
  724.         // Generated using JFormDesigner Evaluation license - marc davis
  725.         private JButton button1;
  726.         private JTextField textField1;
  727.         private JLabel label1;
  728.         private JLabel label2;
  729.         private JLabel label3;
  730.         private JLabel label4;
  731.         private JLabel label5;
  732.         private JLabel label6;
  733.         // JFormDesigner - End of variables declaration  //GEN-END:variables
  734.     }
  735.  
  736.  
  737. }
  738.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement