Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.awt.BasicStroke;
- import java.awt.Color;
- import java.awt.Font;
- import java.awt.Graphics;
- import java.awt.Graphics2D;
- import java.awt.Point;
- import java.awt.Rectangle;
- import java.awt.event.MouseEvent;
- import java.awt.event.MouseListener;
- import java.io.BufferedReader;
- import java.io.BufferedWriter;
- import java.io.IOException;
- import java.io.InputStreamReader;
- import java.io.OutputStreamWriter;
- import java.net.Socket;
- import java.net.UnknownHostException;
- import java.util.regex.Matcher;
- import java.util.regex.Pattern;
- import org.rsbot.event.listeners.PaintListener;
- import org.rsbot.script.Script;
- import org.rsbot.script.ScriptManifest;
- import org.rsbot.script.methods.Game;
- import org.rsbot.script.methods.Skills;
- import org.rsbot.script.wrappers.RSArea;
- import org.rsbot.script.wrappers.RSItem;
- import org.rsbot.script.wrappers.RSObject;
- import org.rsbot.script.wrappers.RSTile;
- import org.rsbot.script.wrappers.RSComponent;
- import org.rsbot.script.wrappers.RSInterface;
- @ScriptManifest(authors = "Anarki, Uplift", keywords = "Smithing", name = "Epic Edgeville Gold Bar Smelter", version = 1.04, description = "Smelt Gold Bar at Edgeville. Made by Uplift and Improved by Anarki.")
- public class EpicEdgevilleGoldBarSmelter extends Script implements PaintListener,
- MouseListener {
- public double getVersion() {
- return 1.04;
- }
- // Ints/Longs
- private int goldBarID = 2357, barID = goldBarID,
- failSafe, itemID, itemsDone, interfaceParent,
- interfaceChild, bankID, startXP, cXP, startLevel, runEnergy = 50,
- XPPH;
- private long startTime, rSeconds, rMinutes, rHours;
- // Tiles
- private RSTile smith, bankTile, stage2, failSafeTile;
- // Areas
- private RSArea bankArea, furnArea;
- // Strings
- String location, itemName = "Null", cLine;
- // Boolean
- private boolean gem, canCount = true, canStoreAll = true, usedFurance,
- usedBank, has2Stages, showPaint = true, scriptRunning;
- // Other
- Point mouseP;
- Rectangle togglePaint = new Rectangle(421, 350, 70, 20);
- // ---------------- Auto Login int --------------------
- private static final int INTERFACE_LOGIN_SCREEN = 596;
- private static final int INTERFACE_TEXT_RETURN = 11;
- private static final int INTERFACE_WELCOME_SCREEN = 906;
- private static final int INTERFACE_WELCOME_SCREEN_BUTTON_PLAY_1 = 160;
- private static final int INTERFACE_WELCOME_SCREEN_BUTTON_PLAY_2 = 171;
- private static final int INTERFACE_WELCOME_SCREEN_BUTTON_LOGOUT = 193;
- private static final int INTERFACE_WELCOME_SCREEN_BUTTON_BACK = 228;
- private static final int INTERFACE_WELCOME_SCREEN_TEXT_RETURN = 221;
- private static final int INTERFACE_WELCOME_SCREEN_HIGH_RISK_WORLD_TEXT = 86;
- private static final int INTERFACE_WELCOME_SCREEN_HIGH_RISK_WORLD_LOGIN_BUTTON = 93;
- private static final int INDEX_LOGGED_OUT = 3;
- private static final int INDEX_LOBBY = 7;
- private int invalidCount;
- public boolean onStart() {
- camera.setPitch(true);
- camera.setPitch(true);
- trentCrafterGUI g = new trentCrafterGUI();
- g.setVisible(true);
- while (g.isVisible())
- sleep(100);
- startXP = skills.getCurrentExp(Skills.SMITHING);
- startLevel = skills.getCurrentLevel(Skills.SMITHING);
- scriptRunning = true;
- return true;
- }
- public void onFinish() {
- log("You made " + itemsDone + " " + itemName + "'s in " + rHours
- + " hours " + rMinutes + " minutes and " + rSeconds
- + " seconds!");
- scriptRunning = false;
- }
- @Override
- public int loop() {
- if (game.isLoggedIn()) {
- mouse.setSpeed(random(6, 8));
- }
- while (interfaces.get(906).containsText("Logging")) {
- sleep(10000);
- }
- if (!game.isLoggedIn()) {
- String returnText = interfaces.get(INTERFACE_LOGIN_SCREEN)
- .getComponent(INTERFACE_TEXT_RETURN).getText().toLowerCase();
- int textlength;
- if (game.getClientState() != INDEX_LOGGED_OUT) {
- if (!game.isWelcomeScreen()) {
- sleep(random(1000, 2000));
- }
- if (game.getClientState() == INDEX_LOBBY) {
- RSInterface welcome_screen = interfaces
- .get(INTERFACE_WELCOME_SCREEN);
- RSComponent welcome_screen_button_play_1 = welcome_screen
- .getComponent(INTERFACE_WELCOME_SCREEN_BUTTON_PLAY_1);
- RSComponent welcome_screen_button_play_2 = welcome_screen
- .getComponent(INTERFACE_WELCOME_SCREEN_BUTTON_PLAY_2);
- mouse.click(welcome_screen_button_play_1.getAbsoluteX(),
- welcome_screen_button_play_1.getAbsoluteY(),
- welcome_screen_button_play_2.getAbsoluteX()
- + welcome_screen_button_play_2.getWidth()
- - welcome_screen_button_play_1.getAbsoluteX(),
- welcome_screen_button_play_1.getHeight(), true);
- for (int i = 0; i < 4 && game.getClientState() == 6; i++) {
- sleep(500);
- }
- returnText = interfaces.get(INTERFACE_WELCOME_SCREEN)
- .getComponent(INTERFACE_WELCOME_SCREEN_TEXT_RETURN)
- .getText().toLowerCase();
- if (returnText.contains("total skill level of")) {
- log("You don't have enough total level of the world required.");
- interfaces.getComponent(INTERFACE_WELCOME_SCREEN,
- INTERFACE_WELCOME_SCREEN_BUTTON_BACK).doClick();
- return -1;
- }
- if (returnText.contains("login limit exceeded")) {
- if(interfaces.getComponent(INTERFACE_WELCOME_SCREEN_BUTTON_BACK).isValid())
- interfaces.getComponent(INTERFACE_WELCOME_SCREEN_BUTTON_BACK).doClick();
- }
- if (returnText.contains("your account has not logged out")) {
- if (invalidCount > 10) {
- log.warning("Unable to login after 10 attempts. Stopping script.");
- log.severe("It seems you are actually already logged in?");
- return -1;
- }
- invalidCount++;
- log.severe("Waiting for logout..");
- sleep(5000,15000);
- }
- if (returnText.contains("member")) {
- log("Unable to login to a members world. Stopping script.");
- RSComponent back_button1 = interfaces.get(
- INTERFACE_WELCOME_SCREEN).getComponent(228);
- RSComponent back_button2 = interfaces.get(
- INTERFACE_WELCOME_SCREEN).getComponent(231);
- mouse.click(
- back_button1.getAbsoluteX(),
- back_button1.getAbsoluteY(),
- back_button2.getAbsoluteX()
- + back_button2.getWidth()
- - back_button1.getAbsoluteX(),
- back_button1.getHeight(), true);
- interfaces.get(INTERFACE_WELCOME_SCREEN).getComponent(203)
- .doClick();
- return -1;
- }
- if (interfaces
- .get(INTERFACE_WELCOME_SCREEN)
- .getComponent(
- INTERFACE_WELCOME_SCREEN_HIGH_RISK_WORLD_TEXT)
- .getText().toLowerCase().trim()
- .contains("high-risk wilderness world")) {
- interfaces
- .get(INTERFACE_WELCOME_SCREEN)
- .getComponent(
- INTERFACE_WELCOME_SCREEN_HIGH_RISK_WORLD_LOGIN_BUTTON)
- .doClick();
- }
- }
- }
- }
- if (camera.getPitch() < 3000)
- camera.setPitch(true);
- if (game.getCurrentTab() != Game.TAB_INVENTORY) {
- game.openTab(Game.TAB_INVENTORY);
- }
- if (interfaces.getComponent(interfaceParent, interfaceChild).isValid()) {
- interfaces.getComponent(interfaceParent, interfaceChild).doAction("Make All");
- usedFurance = false;
- failSafe = 0;
- return random(500, 1000);
- }
- if (interfaces.getComponent(446, 12).isValid()) {
- interfaces.getComponent(446, 12).doClick();
- return random(500, 1000);
- }
- if (walking.getEnergy() >= runEnergy)
- walking.setRun(true);
- if (atBank()) {
- if (!game.isLoggedIn()) {
- log("You have logged out. Maybe forced by Jagex due to continuous playing of 6 hours.");
- log("or disconnection.");
- }
- if (inventory.getCount(itemID) > 0) {
- canCount = true;
- walkTo(smith, furnArea);
- return random(500, 1000);
- } else {
- if (bank.isOpen()) {
- if (inventory.getCount() > 1) {
- bank.depositAll();
- return random(50, 900);
- }
- if (inventory.getCount() > 1
- && !inventory.contains(itemID)) {
- bank.depositAll();
- return random(500, 1000);
- }
- if (bank.getCount(itemID) < 1) {
- sleep(random(250, 500));
- if (bank.getCount(itemID) < 1) {
- sleep(random(250, 500));
- if (bank.getCount(itemID) < 1) {
- sleep(random(250, 500));
- if (bank.getCount(itemID) < 1) {
- sleep(random(250, 500));
- if (bank.getCount(itemID) < 1) {
- sleep(random(250, 500));
- if (bank.getCount(itemID) < 1) {
- sleep(random(1000, 2000));
- if (bank.getCount(itemID) < 1) {
- log("Smelted all the bars! Stopping script!");
- if (bank.isOpen())
- bank.close();
- env.saveScreenshot(false);
- game.logout(false);
- return -1;
- }
- }
- }
- }
- }
- }
- }
- if (inventory.getCount(itemID) == 0) {
- withdrawItems(itemID, 0);
- return random(1000, 1300);
- }
- } else {
- if (usedBank) {
- if (getMyPlayer().isMoving()) {
- return random(50, 300);
- }
- }
- RSObject banker = objects.getNearest(bankID);
- if (banker != null) {
- if (!calc.tileOnScreen(banker.getLocation())) {
- walkTo(bankTile, bankArea);
- return random(500, 1000);
- }
- if (canCount) {
- itemsDone += inventory.getCount(barID);
- canCount = false;
- }
- if (!banker.doAction("Use-quickly")) {
- camera.turnToObject(banker);
- } else {
- usedBank = true;
- sleep(800, 900);
- }
- return random(500, 900);
- }
- }
- }
- }
- if (atFur()) {
- if (!game.isLoggedIn()) {
- log("You have logged out. Maybe forced by Jagex due to continuous playing of 6 hours.");
- log("or disconnection.");
- }
- if (failSafe != 0)
- failSafe = 0;
- if (inventory.getCount(barID) > 27) {
- walkTo(bankTile, bankArea);
- return random(1000, 2000);
- }
- if (isSmelting()) {
- antiBan();
- return random(500, 1000);
- }
- if (inventory.getCount(itemID) < 1) {
- walkTo(bankTile, bankArea);
- return random(500, 1000);
- }
- RSObject Furnace = objects.getNearest(26814);
- RSItem goldBar = inventory.getItem(itemID);
- if (Furnace != null & Furnace.isOnScreen()) {
- Furnace.doClick();
- mouse.move(257, 423, 8, 8);
- sleep(random(1500, 1800));
- mouse.click(true);
- sleep(random(300, 500));
- mouse.click(true);
- sleep(random(300, 500));
- mouse.click(true);
- sleep(random(300, 500));
- mouse.click(true);
- sleep(random(300, 500));
- mouse.click(true);
- sleep(random(300, 500));
- }
- int rand = random(0, 40);
- if (rand > 35)
- camera.setAngle(random(0, 360));
- else if (rand < 5)
- camera.setPitch(true);
- if (inventory.getCount(barID) > 27) {
- walkTo(bankTile, bankArea);
- return random(1000, 2000);
- }
- if (inventory.getCount(itemID) < 1) {
- walkTo(bankTile, bankArea);
- return random(500, 1000);
- }
- }
- if (!atFur() & !atBank() & !getMyPlayer().isMoving()) {
- if (inventory.getCount(barID) > 0) {
- if (!usedFurance || !getMyPlayer().isMoving()
- && calc.distanceTo(walking.getDestination()) < 3)
- walkTo(smith, furnArea);
- } else {
- walkTo(bankTile, bankArea);
- }
- }
- if (inventory.getCount(barID) > 27) {
- walkTo(bankTile, bankArea);
- return random(1000, 2000);
- }
- if (inventory.getCount(itemID) < 1) {
- walkTo(bankTile, bankArea);
- return random(500, 1000);
- }
- return 50;
- }
- public boolean atFur() {
- return objects.getNearest(26814).isOnScreen();
- }
- public boolean atBank() {
- return objects.getNearest(26972).isOnScreen();
- }
- private final Color color1 = new Color(0, 0, 0, 140);
- private final Color color2 = new Color(0, 0, 0);
- private final Color color3 = new Color(255, 255, 255);
- private final Color colorGreen = new Color(0, 255, 0);
- private final Color colorRed = new Color(255, 0, 0);
- private final BasicStroke stroke1 = new BasicStroke(1);
- private final Font font1 = new Font("Arial", 0, 17);
- private final Font font2 = new Font("Arial", 0, 14);
- public void onRepaint(Graphics g1) {
- if (game.isLoggedIn()) {
- if (startTime == 0)
- startTime = System.currentTimeMillis();
- long millis = System.currentTimeMillis() - startTime;
- final long hours = millis / (1000 * 60 * 60);
- millis -= hours * 1000 * 60 * 60;
- final long minutes = millis / (1000 * 60);
- millis -= minutes * 1000 * 60;
- final long seconds = millis / 1000;
- cXP = skills.getCurrentExp(Skills.SMITHING);
- rHours = hours;
- int percentToNextLevel = skills.getPercentToNextLevel(Skills.SMITHING);
- rMinutes = minutes;
- rSeconds = seconds;
- XPPH = (int) ((cXP - startXP) * 3600000D / (System.currentTimeMillis() - startTime));
- int x = 20;
- int y = 370;
- Graphics2D g = (Graphics2D) g1;
- if (showPaint) {
- g.setColor(color1);
- g.fillRect(13, 349, 478, 103);
- g.setColor(color2);
- g.setStroke(stroke1);
- g.drawRect(13, 349, 478, 103);
- g.setFont(font1);
- g.setColor(color3);
- g.drawString("Epic Edgeville Gold Bar Smelter : V" + getVersion(), x, y);
- g.setFont(font2);
- g.drawString("Runtime : " + rHours + ":" + rMinutes + ":" + rSeconds, x, y + 30);
- g.drawString("Levels Gained : " + (skills.getCurrentLevel(Skills.SMITHING) - startLevel), x, y + 45);
- g.drawString("Current Level : " + skills.getCurrentLevel(Skills.SMITHING), x, y + 60);
- g.drawString("Exp gained : " + (cXP - startXP) + " xp", x, y + 75);
- g.setColor(color3);
- g.drawString("Items Banked : " + itemsDone, x + 210, y + 30);
- g.drawString("Exp per hour : " + XPPH + " xp", x + 210, y + 45);
- g.drawString("Exp to next level : " + skills.getExpToNextLevel(Skills.SMITHING) + " xp", x + 210, y + 60);
- g.setColor(colorRed);
- g.fillRoundRect(9, 460, 483, 12, 10, 10);
- g.setColor(colorGreen);
- int greenWidth = 460 * percentToNextLevel / 100;
- g.fillRoundRect(9, 460, greenWidth, 12, 10, 10);
- g.setColor(color2);
- g.drawString("% to next level : " + percentToNextLevel, 166, 471);
- g.setColor(color1);
- g.fillRect(421, 350, 70, 20);
- g.setColor(color3);
- g.drawString("Hide Paint", 423, 364);
- g.setColor(colorGreen);
- } else {
- g.setColor(color1);
- g.fillRect(421, 350, 70, 20);
- g.setColor(color3);
- g.drawString("Show Paint", 423, 364);
- }
- }
- }
- public boolean isSmelting() {
- if (getMyPlayer().getAnimation() == -1) {
- sleep(random(800, 1300));
- if (getMyPlayer().getAnimation() == -1) {
- sleep(random(400, 900));
- if (getMyPlayer().getAnimation() == -1) {
- sleep(random(200, 500));
- if (getMyPlayer().getAnimation() == -1) {
- return false;
- }
- }
- }
- }
- return true;
- }
- public void withdrawItems(int id, int count) {
- RSItem item = bank.getItem(id);
- String action = null;
- boolean hasAction = false;
- if (count == 0) {
- action = "Withdraw-All";
- } else {
- action = "Withdraw-" + count;
- }
- if (item != null) {
- item.doClick(false);
- String[] actions = menu.getActions();
- for (int i = 0; i < actions.length - 1; i++) {
- if (actions[i].equals(action)) {
- hasAction = true;
- }
- }
- if (hasAction) {
- item.doAction(action);
- } else {
- item.doAction("Withdraw-X");
- sleep(random(1000, 1500));
- keyboard.sendText("" + count, true);
- }
- }
- sleep(random(100, 500));
- }
- public void antiBan() {
- int rand = random(0, 999);
- if (rand < 99) {
- runEnergy = random(30, 100);
- } else if (rand >= 99 && rand < 199) {
- camera.setAngle(random(1, 360));
- } else if (rand >= 199 && rand < 299) {
- mouse.move(random(1, 770), random(1, 550));
- } else if (rand >= 299 && rand < 399) {
- mouse.move(random(1, 770), random(1, 550));
- } else if (rand >= 399 && rand < 499) {
- mouse.setSpeed(random(7, 10));
- }
- }
- public void walkTo(RSTile tile, RSArea area) {
- RSTile[] p = walking.findPath(tile);
- int len = p.length - 1;
- if (!getMyPlayer().isMoving()
- || (walking.getDestination() != null && calc.distanceTo(walking
- .getDestination()) < 10)) {
- if (walking.getDestination() == null
- || calc.distanceBetween(walking.getDestination(), p[len]) > 5)
- if (!calc.tileOnScreen(tile)) {
- walking.walkPathMM(walking.randomizePath(p, 2, 2));
- } else {
- walking.walkTileMM(walking.randomizeTile(tile, 3, 3));
- }
- }
- }
- public class trentCrafterGUI extends javax.swing.JFrame {
- /** Creates new form trentCrafterGUI */
- public trentCrafterGUI() {
- initComponents();
- }
- @SuppressWarnings("unchecked")
- private void initComponents() {
- jLabel1 = new javax.swing.JLabel();
- jComboBox1 = new javax.swing.JComboBox();
- jComboBox2 = new javax.swing.JComboBox();
- jLabel2 = new javax.swing.JLabel();
- jLabel3 = new javax.swing.JLabel();
- jButton1 = new javax.swing.JButton();
- setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
- jLabel1.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
- jLabel1.setText("Epic Edgeville Gold Bar Smelter");
- jComboBox1.setModel(new javax.swing.DefaultComboBoxModel(
- new String[] { "Gold Bar" }));
- jComboBox2.setModel(new javax.swing.DefaultComboBoxModel(
- new String[] { "Edgeville" }));
- jLabel2.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
- jLabel2.setText("Bar to Smelt: (Make sure Gold Bars are visible in your bank!)");
- jLabel3.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
- jLabel3.setText("Location:");
- jButton1.setText("Start script!");
- jButton1.addActionListener(new java.awt.event.ActionListener() {
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- jButton1ActionPerformed(evt);
- }
- });
- javax.swing.GroupLayout layout = new javax.swing.GroupLayout(
- getContentPane());
- getContentPane().setLayout(layout);
- layout.setHorizontalGroup(layout
- .createParallelGroup(
- javax.swing.GroupLayout.Alignment.LEADING)
- .addGroup(
- layout.createSequentialGroup()
- .addContainerGap()
- .addGroup(
- layout.createParallelGroup(
- javax.swing.GroupLayout.Alignment.LEADING)
- .addGroup(
- javax.swing.GroupLayout.Alignment.TRAILING,
- layout.createSequentialGroup()
- .addComponent(
- jLabel1)
- .addGap(174,
- 174,
- 174))
- .addGroup(
- layout.createSequentialGroup()
- .addGroup(
- layout.createParallelGroup(
- javax.swing.GroupLayout.Alignment.LEADING)
- .addComponent(
- jComboBox1,
- javax.swing.GroupLayout.PREFERRED_SIZE,
- 276,
- javax.swing.GroupLayout.PREFERRED_SIZE)
- .addComponent(
- jComboBox2,
- javax.swing.GroupLayout.PREFERRED_SIZE,
- 276,
- javax.swing.GroupLayout.PREFERRED_SIZE)
- .addGroup(
- layout.createSequentialGroup()
- .addComponent(
- jLabel2)
- .addPreferredGap(
- javax.swing.LayoutStyle.ComponentPlacement.RELATED,
- 168,
- javax.swing.GroupLayout.PREFERRED_SIZE))
- .addGroup(
- layout.createSequentialGroup()
- .addComponent(
- jLabel3)
- .addPreferredGap(
- javax.swing.LayoutStyle.ComponentPlacement.RELATED,
- 219,
- javax.swing.GroupLayout.PREFERRED_SIZE)))
- .addContainerGap(
- javax.swing.GroupLayout.DEFAULT_SIZE,
- Short.MAX_VALUE))
- .addGroup(
- layout.createSequentialGroup()
- .addComponent(
- jButton1,
- javax.swing.GroupLayout.DEFAULT_SIZE,
- 276,
- Short.MAX_VALUE)
- .addContainerGap()))));
- layout.setVerticalGroup(layout
- .createParallelGroup(
- javax.swing.GroupLayout.Alignment.LEADING)
- .addGroup(
- layout.createSequentialGroup()
- .addContainerGap()
- .addComponent(jLabel1)
- .addGap(18, 18, 18)
- .addComponent(jLabel2)
- .addPreferredGap(
- javax.swing.LayoutStyle.ComponentPlacement.RELATED)
- .addComponent(
- jComboBox1,
- javax.swing.GroupLayout.PREFERRED_SIZE,
- javax.swing.GroupLayout.DEFAULT_SIZE,
- javax.swing.GroupLayout.PREFERRED_SIZE)
- .addPreferredGap(
- javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
- .addComponent(jLabel3)
- .addGap(4, 4, 4)
- .addComponent(
- jComboBox2,
- javax.swing.GroupLayout.PREFERRED_SIZE,
- javax.swing.GroupLayout.DEFAULT_SIZE,
- javax.swing.GroupLayout.PREFERRED_SIZE)
- .addPreferredGap(
- javax.swing.LayoutStyle.ComponentPlacement.RELATED)
- .addComponent(jButton1)
- .addContainerGap(
- javax.swing.GroupLayout.DEFAULT_SIZE,
- Short.MAX_VALUE)));
- pack();
- }//
- /**
- * @param args
- * the command line arguments
- */
- // Variables declaration - do not modify
- private javax.swing.JButton jButton1;
- private javax.swing.JComboBox jComboBox1;
- private javax.swing.JComboBox jComboBox2;
- private javax.swing.JLabel jLabel1;
- private javax.swing.JLabel jLabel2;
- private javax.swing.JLabel jLabel3;
- // End of variables declaration
- private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
- itemName = jComboBox1.getSelectedItem().toString();
- location = jComboBox2.getSelectedItem().toString();
- log("Assigning vars");
- if (location.contains("Edgeville")) {
- smith = new RSTile(3109, 3501);
- bankTile = new RSTile(3096, 3497);
- bankArea = new RSArea(new RSTile(3096, 3497), new RSTile(3096, 3497));
- furnArea = new RSArea(new RSTile(3109, 3501), new RSTile(3109, 3501));
- // RSArea = new RSArea( north-east RSTile, South-west RSTile );
- bankID = 26972;
- }
- if (itemName.equals("Gold Bar")) {
- interfaceParent = 905;
- interfaceChild = 14;
- barID = goldBarID;
- itemID = 444;
- itemName = "Gold Bar";
- }
- log("Smelting " + itemName + " at: " + location + "!");
- this.setVisible(false);
- }
- }
- @Override
- public void mouseClicked(MouseEvent e) {
- mouseP = e.getPoint();
- if (togglePaint.contains(mouseP)) {
- if (showPaint)
- showPaint = false;
- else
- showPaint = true;
- }
- }
- @Override
- public void mouseEntered(MouseEvent arg0) {
- // TODO Auto-generated method stub
- }
- @Override
- public void mouseExited(MouseEvent arg0) {
- // TODO Auto-generated method stub
- }
- @Override
- public void mousePressed(MouseEvent arg0) {
- // TODO Auto-generated method stub
- }
- @Override
- public void mouseReleased(MouseEvent arg0) {
- // TODO Auto-generated method stub
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement