Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //This script is the sole property of Robert G
- //Anyone found re-distributing it may face legal consequences!
- import java.awt.BasicStroke;
- import java.awt.BorderLayout;
- import java.awt.Color;
- import java.awt.Container;
- import java.awt.Font;
- import java.awt.Graphics;
- import java.awt.Graphics2D;
- import java.awt.GridBagConstraints;
- import java.awt.GridBagLayout;
- import java.awt.Image;
- import java.awt.Insets;
- import java.awt.Point;
- import java.awt.Rectangle;
- import java.awt.RenderingHints;
- import java.awt.event.ActionEvent;
- import java.awt.event.ActionListener;
- import java.awt.event.MouseEvent;
- import java.awt.event.MouseListener;
- import java.io.BufferedReader;
- import java.io.IOException;
- import java.io.InputStreamReader;
- import java.lang.reflect.InvocationTargetException;
- import java.net.MalformedURLException;
- import java.net.URL;
- import java.text.NumberFormat;
- import javax.imageio.ImageIO;
- import javax.swing.DefaultComboBoxModel;
- import javax.swing.GroupLayout;
- import javax.swing.JButton;
- import javax.swing.JCheckBox;
- import javax.swing.JComboBox;
- import javax.swing.JFrame;
- import javax.swing.JLabel;
- import javax.swing.JPanel;
- import javax.swing.LayoutStyle;
- import javax.swing.SwingUtilities;
- import javax.swing.border.EmptyBorder;
- import com.rarebot.event.events.MessageEvent;
- import com.rarebot.event.listeners.MessageListener;
- import com.rarebot.event.listeners.PaintListener;
- import com.rarebot.script.Script;
- import com.rarebot.script.ScriptManifest;
- import com.rarebot.script.methods.Skills;
- import com.rarebot.script.methods.Game.Tab;
- import com.rarebot.script.util.Filter;
- import com.rarebot.script.util.Timer;
- import com.rarebot.script.wrappers.RSComponent;
- import com.rarebot.script.wrappers.RSNPC;
- import com.rarebot.script.wrappers.RSObject;
- import com.rarebot.script.wrappers.RSTile;
- @ScriptManifest(authors = { "Robert G" }, name = "GuildFisher", version = 1.3)
- public class GuildFisher extends Script implements MessageListener, PaintListener, MouseListener {
- private static final int bankBooth = 49018;
- private static int spotID;
- private static final int[] FISHING_URN = { 20334, 20335, 20336 };
- private static final int[] STRONG_URN = { 20340, 20341, 20342 };
- private static final int[] DECORATED_URN = { 20346, 20347, 20348 };
- private static int[] urnID = null;
- private static boolean useUrns;
- private static RSTile spotTile;
- private static final RSTile bankTile = new RSTile(2586, 3422);
- private static String catchOption;
- private static boolean powerFishing;
- private static boolean start = false;
- private static long startTime, runTime, timeTNL;
- private static int expGained, startExp, startLVL, gainedLVL, currentLVL, TNL, expPH, fish = 0;
- private static String status = "Loading...";
- private static final Rectangle close = new Rectangle(6, 344, 506, 131);
- private static boolean hide;
- private static final NumberFormat nf = NumberFormat.getInstance();
- private static GuildFisherGUI g;
- private static final String versionUrl = "http://pastebin.com/raw.php?i=cWteFCiU";
- ScriptManifest props = getClass().getAnnotation(ScriptManifest.class);
- private boolean checkVersion(double currentVersion, double latestVersion) {
- return (currentVersion >= latestVersion);
- }
- private double getCurrentVersion(String webUrl, String search) {
- try {
- URL url = new URL(webUrl);
- BufferedReader x = new BufferedReader(new InputStreamReader(
- url.openStream()));
- String inputLine;
- while ((inputLine = x.readLine()) != null) {
- if (inputLine.contains(search)) {
- return Double.parseDouble(x.readLine());
- }
- }
- x.close();
- } catch (MalformedURLException e) {
- e.printStackTrace();
- } catch (IOException e) {
- e.printStackTrace();
- }
- return -1D;
- }
- private boolean checkForUrns() {
- if (inventory.containsOneOf(FISHING_URN)) {
- log("Fishing urn detected, urn support enabled.");
- urnID = new int[3];
- urnID = FISHING_URN;
- return useUrns = true;
- } else if (inventory.containsOneOf(STRONG_URN)) {
- log("Strong fishing urn detected, urn support enabled.");
- urnID = new int[3];
- urnID = STRONG_URN;
- return useUrns = true;
- } else if (inventory.containsOneOf(DECORATED_URN)) {
- log("Decorated fishing urn detected, urn support enabled.");
- urnID = new int[3];
- urnID = DECORATED_URN;
- return useUrns = true;
- } else {
- return useUrns = false;
- }
- }
- public class imageLoader extends Thread {
- private imageLoader() {
- Thread t = new Thread(this);
- t.start();
- }
- @Override
- public void run() {
- log("Loading images....");
- img1 = getImage("http://desmond.imageshack.us/Himg23/scaled.php?server=23&filename=cooltext643592515.png&res=medium");
- img2 = getImage("http://img834.imageshack.us/img834/9746/thfishingcapet.png");
- img3 = getImage("http://img525.imageshack.us/img525/6704/cooltext643600500.png");
- log("Finished loading images.");
- }
- }
- @Override
- public boolean onStart() {
- log("Welcome to GuildFisher by Robert G");
- log("Checking script version");
- if (checkVersion(props.version(), getCurrentVersion(versionUrl, props.name()))) {
- log("You have the latest version, starting up.");
- } else {
- log.severe("New version available, please update.");
- return false;
- }
- try {
- SwingUtilities.invokeAndWait(new Runnable() {
- @Override
- public void run() {
- g = new GuildFisherGUI();
- }
- });
- } catch (InterruptedException e) {
- e.printStackTrace();
- } catch (InvocationTargetException e) {
- e.printStackTrace();
- }
- while (g.isVisible()) {
- sleep(200);
- }
- if (start) {
- setValues();
- checkForUrns();
- new imageLoader();
- }
- return start;
- }
- private void setValues() {
- startExp = skills.getCurrentExp(Skills.FISHING);
- startLVL = skills.getCurrentLevel(Skills.FISHING);
- startTime = System.currentTimeMillis();
- }
- private RSNPC getSpot() {
- return npcs.getNearest(new Filter<RSNPC>() {
- @Override
- public boolean accept(RSNPC npc) {
- return npc.getID() == spotID;
- }
- });
- }
- private boolean atSpot() {
- return getSpot() != null;
- }
- public class camera extends Thread {
- private RSNPC npc;
- private camera(RSNPC npc) {
- this.npc = npc;
- Thread t = new Thread(this);
- if (!t.isAlive()) {
- t.start();
- }
- }
- @Override
- public void run() {
- camera.turnTo(npc);
- camera.setPitch(true);
- }
- }
- private int missClick = 0;
- private boolean fish() {
- final RSNPC spot = getSpot();
- if (spot != null) {
- if (!spot.isOnScreen()) {
- new camera(spot);
- return walking.walkTileMM(spot.getLocation());
- } else {
- if (missClick == random(5, 10)) {
- missClick = 0;
- mouse.hop(spot.getPoint());
- mouse.click(false);
- sleep(600, 800);
- mouse.moveSlightly();
- } else {
- missClick++;
- mouse.hop(spot.getPoint());
- return spot.interact(catchOption);
- }
- }
- }
- return false;
- }
- private void antiban() {
- int b = random(0, 9);
- switch (b) {
- case 1:
- if (random(0, 60) == 1) {
- status = "Antiban: Moving mouse.";
- mouse.moveSlightly();
- sleep(2000, 6000);
- mouse.moveRandomly(1500, 1600);
- }
- break;
- case 2:
- if (random(0, 73) == 2) {
- status = "Antiban: Setting camera.";
- camera.setAngle(random(30, 130));
- sleep(400, 800);
- }
- break;
- case 3:
- if (random(0, 80) == 3) {
- status = "Antiban: Setting camera.";
- camera.setAngle(random(150, 270));
- sleep(1200, 1500);
- }
- break;
- case 4:
- if (random(0, 100) == 4) {
- status = "Antiban: Checking xp.";
- game.openTab(Tab.STATS);
- if (skills.doHover(Skills.INTERFACE_FISHING)) {
- sleep(2100, 3400);
- }
- }
- break;
- case 5:
- if (random(0, 100) == 5) {
- status = "Antiban: Opening random tab.";
- if (game.openTab(game.getRandomTab())) {
- sleep(3000, 3400);
- }
- }
- break;
- case 6:
- if (random(0, 70) == 6) {
- status = "Antiban: Miss-clicking mouse.";
- mouse.click(false);
- sleep(1400, 1800);
- mouse.moveRandomly(150, 350);
- sleep(1500, 1600);
- }
- break;
- case 7:
- if (random(0, 50) == 7) {
- status = "Antiban: AFK.";
- mouse.moveOffScreen();
- sleep(2000, 14000);
- }
- break;
- case 8:
- if (random(0, 80) == 10) {
- status = "Antiban: Rotate screen.";
- camera.setCompass(randomChar());
- sleep(2000, 2500);
- }
- break;
- case 9:
- if (random(0, 36) == 10 && useUrns) {
- if (!needUrn()) {
- final RSComponent urn = inventory.getItem(urnID).getComponent();
- if (urn != null) {
- mouse.move(urn.getCenter(), 3, 3);
- urn.interact("Check");
- sleep(1000, 1200);
- }
- }
- }
- break;
- }
- }
- private char randomChar() {
- int b = random(0, 4);
- return b == 1 ? 'n' : b == 2 ? 'e' : b == 3 ? 'w' : 's';
- }
- private boolean open() {
- final RSObject booth = objects.getNearest(bankBooth);
- if (booth != null) {
- if (booth.isOnScreen()) {
- camera.turnTo(booth);
- return booth.interact("Bank");
- } else {
- camera.turnTo(booth);
- return walking.walkTileMM(booth.getLocation(), 2, 2);
- }
- }
- return false;
- }
- private boolean urnCheck() {
- return useUrns && inventory.contains(urnID[2]);
- }
- private boolean needUrn() {
- return useUrns && !inventory.containsOneOf(urnID);
- }
- private boolean teleportUrn() {
- final RSComponent f = inventory.getItem(urnID[2]).getComponent();
- mouse.move(f.getCenter(), 3, 3);
- if (f != null) {
- if (f.interact("Teleport")) {
- waitFor(1500, getInt().isValid());
- }
- }
- if (getInt().isValid()) {
- if (getInt().doClick()) {
- return true;
- }
- }
- return false;
- }
- private RSComponent getInt() {
- return interfaces.getComponent(905, 14);
- }
- private void waitFor(long time, boolean stop) {
- final long start = System.currentTimeMillis();
- while (System.currentTimeMillis() - start < time) {
- sleep(50);
- if (stop)break;
- }
- }
- @Override
- public int loop() {
- switch (getState()) {
- case SLEEP:
- status = "Waiting for client.";
- return random(1200, 1500);
- case ANTIBAN:
- status = "Antiban.";
- antiban();
- break;
- case WALK_SPOT:
- if (walking.walkTileMM(spotTile, 2, 2)) {
- return random(2000, 2100);
- }
- break;
- case TELEPORT_URN:
- status = "Teleporting urn.";
- if (teleportUrn()) {
- return random(1000, 1200);
- }
- break;
- case FISH:
- status = "Interacting with fishing spot.";
- if (fish()) {
- return random(1200, 1400);
- }
- break;
- case FISHING:
- status = "Catching fish.";
- return random(1000, 15000);
- case DROP:
- if (inventory.dropAll(1)) {
- return random(200, 300);
- }
- break;
- case WALK_BANK:
- status = "Walking to bank.";
- if (walking.walkTileMM(bankTile, 2 ,2)) {
- return random(2000, 2100);
- }
- break;
- case BANK:
- if (!bank.isOpen()) {
- status = "Opening bank.";
- if (open()) {
- return random(1800, 2000);
- }
- } else {
- status = "Depositing fish.";
- if (!useUrns) {
- bank.depositAll();
- } else {
- if (bank.depositAllExcept(urnID[0], urnID[1], urnID[2])) {
- sleep(500, 600);
- }
- }
- if (useUrns && needUrn()) {
- if (bank.getCount(urnID) > 0) {
- status = "Withdrawing urn.";
- for(int i = 0; i < urnID.length; i++) {
- if (bank.withdraw(urnID[i], 1)) {
- sleep(500, 600);
- }
- }
- } else {
- status = "Ran out of urns, disabling urn support.";
- useUrns = false;
- }
- }
- status = "Closing bank.";
- if (bank.close()) {
- return 100;
- }
- }
- break;
- case CLOSE:
- status = "Closing collection box.";
- if (interfaces.getComponent(109, 14).isValid()) {
- if (interfaces.getComponent(109, 14).doClick()) {
- return random(1000, 1200);
- }
- }
- break;
- }
- return 0;
- }
- @Override
- public void onFinish() {
- log(Color.blue, "Thanks for using GuildFisher by Robert G!");
- log(Color.blue, "You gained fishing: " + nf(expGained) + " xp and " + gainedLVL + " fishing levels");
- log(Color.blue, "Total fish caught: " + nf(fish) + " averaging " + PH(fish) + " per hour.");
- }
- private enum State {
- WALK_SPOT, FISH, WALK_BANK, BANK, DROP, SLEEP, ANTIBAN, FISHING, CLOSE, TELEPORT_URN
- }
- private State getState() {
- if (!game.isLoggedIn() || game.isWelcomeScreen()) {
- return State.SLEEP;
- } else {
- if (urnCheck()) {
- return State.TELEPORT_URN;
- }
- if (needUrn()) {
- if (calc.distanceTo(bankTile) < 5) {
- if (interfaces.getComponent(109, 14).isValid()) {
- return State.CLOSE;
- } else {
- return State.BANK;
- }
- } else {
- return State.WALK_BANK;
- }
- }
- if (!inventory.isFull()) {
- if (atSpot()) {
- if (getMyPlayer().getInteracting() == null || !getMyPlayer().getInteracting().equals(getSpot())) {
- return State.FISH;
- } else {
- if (random(0, 20) == 9) {
- return State.ANTIBAN;
- } else {
- return State.FISHING;
- }
- }
- } else {
- return State.WALK_SPOT;
- }
- } else {
- if (!powerFishing) {
- if (calc.distanceTo(bankTile) < 5) {
- if (interfaces.getComponent(109, 14).isValid()) {
- return State.CLOSE;
- } else {
- return State.BANK;
- }
- } else {
- return State.WALK_BANK;
- }
- } else {
- return State.DROP;
- }
- }
- }
- }
- private Image getImage(String url) {
- try {
- return ImageIO.read(new URL(url));
- } catch (IOException e) {
- return null;
- }
- }
- private int PH(int arg0) {
- int PH = (int) (3600000.0 / runTime * arg0);
- return PH;
- }
- private String nf(int number) {
- return nf.format(number);
- }
- @Override
- public void mouseClicked(MouseEvent e) {
- Point p = e.getPoint();
- if (close.contains(p) && !hide) {
- hide = true;
- } else if (close.contains(p) && hide) {
- hide = false;
- }
- }
- @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
- }
- private void setGraphics(Graphics g1){
- ((Graphics2D) g1).setRenderingHint(RenderingHints.KEY_ANTIALIASING,
- RenderingHints.VALUE_ANTIALIAS_ON);
- ((Graphics2D) g1).setRenderingHint(RenderingHints.KEY_COLOR_RENDERING,
- RenderingHints.VALUE_COLOR_RENDER_QUALITY);
- ((Graphics2D) g1).setRenderingHint(RenderingHints.KEY_RENDERING,
- RenderingHints.VALUE_RENDER_QUALITY);
- }
- private final Color color1 = new Color(194, 194, 194);
- private final Color color2 = new Color(248, 0, 0);
- private final Color color3 = new Color(0, 0, 0);
- private final BasicStroke stroke1 = new BasicStroke(1);
- private final Font font1 = new Font("Calibri", 1, 18);
- private final Font font2 = new Font("Calibri", 1, 16);
- private Image img1;
- private Image img2;
- private Image img3;
- @Override
- public void onRepaint(Graphics g1) {
- Graphics2D g = (Graphics2D) g1;
- setGraphics(g1);
- if (!hide) {
- runTime = System.currentTimeMillis() - startTime;
- expGained = skills.getCurrentExp(Skills.FISHING) - startExp;
- currentLVL = skills.getRealLevel(Skills.FISHING);
- gainedLVL = currentLVL - startLVL;
- TNL = skills.getExpToNextLevel(Skills.FISHING);
- if (expGained > 0)timeTNL = (long) ((double) TNL / (double) expPH * 3600000);
- if (expGained > 0)expPH = PH(expGained);
- g.drawImage(img1, -2, 337, null);
- g.setFont(font1);
- g.setColor(color1);
- g.drawString("Run Time: " + Timer.format(runTime), 15, 365);
- g.drawString("Start Level: " + startLVL, 15, 385);
- g.drawString("Current Level: " + currentLVL, 15, 405);
- g.drawString("Levels Gained: " + gainedLVL, 15, 425);
- g.drawString("XP Gained: " + nf(expGained), 15, 445);
- g.drawString("XP / PH: " + nf(PH(expGained)), 260, 365);
- g.drawString("Time TNL: " + Timer.format(timeTNL), 260, 385);
- g.drawString("Fish Caught: " + nf(fish), 260, 405);
- g.drawString("Fish / PH: " + PH(fish), 260, 425);
- g.drawString("Status: " + status, 260, 445);
- final int percent = skills.getPercentToNextLevel(Skills.FISHING);
- final int length = (percent * 487) / 100;
- g.setColor(color2);
- g.fillRect(15, 450, 487, 15);
- g.setColor(color3);
- g.setStroke(stroke1);
- g.drawRect(15, 450, 487, 15);
- g.setColor(Color.GREEN);
- g.fillRect(15, 450, length, 15);
- g.setColor(color3);
- g.setStroke(stroke1);
- g.drawRect(15, 450, length, 15);
- g.setColor(color3);
- g.setFont(font2);
- g.drawString(percent + "% (" + nf(TNL) + " XP TNL)", 175, 462);
- g.drawImage(img2, 416, 349, null);
- g.drawImage(img3, 45, 5, null);
- }
- }
- @Override
- public void messageReceived(MessageEvent e) {
- String x = e.getMessage().toLowerCase();
- if (x.contains("you catch a")) {
- fish++;
- }
- }
- public static enum fishingType {
- LOBSTER(312, "Cage", new RSTile(2600, 3421)),
- SWORDFISH(312, "Harpoon", new RSTile(2600, 3421)),
- SHARK(313, "Harpoon", new RSTile(2604, 3412));
- private int spotID;
- private String catchOption;
- private RSTile tile;
- private fishingType(int spotID, String catchOption, RSTile tile) {
- this.spotID = spotID;
- this.catchOption = catchOption;
- this.tile = tile;
- }
- public int getSpotID() {
- return spotID;
- }
- public String getCatchOption() {
- return catchOption;
- }
- public RSTile getSpotTile() {
- return tile;
- }
- @Override
- public String toString() {
- String name = name().toLowerCase();
- name = name.substring(0, 1).toUpperCase() + name.substring(1);
- return name.replaceAll("_", " ");
- }
- }
- /**
- * @author Robert G
- */
- public class GuildFisherGUI extends JFrame {
- /**
- *
- */
- private static final long serialVersionUID = 1L;
- public GuildFisherGUI() {
- initComponents();
- }
- private void okButtonActionPerformed(ActionEvent e) {
- catchOption = ((fishingType)fishSelected.getSelectedItem()).getCatchOption();
- spotID = ((fishingType)fishSelected.getSelectedItem()).getSpotID();
- spotTile = ((fishingType)fishSelected.getSelectedItem()).getSpotTile();
- powerFishing = checkBox1.isSelected();
- start = true;
- dispose();
- }
- private void initComponents() {
- dialogPane = new JPanel();
- contentPanel = new JPanel();
- label1 = new JLabel();
- label2 = new JLabel();
- fishSelected = new JComboBox();
- label3 = new JLabel();
- checkBox1 = new JCheckBox();
- buttonBar = new JPanel();
- okButton = new JButton();
- // ======== this ========
- Container contentPane = getContentPane();
- contentPane.setLayout(new BorderLayout());
- // ======== dialogPane ========
- {
- dialogPane.setBorder(new EmptyBorder(12, 12, 12, 12));
- dialogPane.setBorder(new javax.swing.border.CompoundBorder(
- new javax.swing.border.TitledBorder(
- new javax.swing.border.EmptyBorder(0, 0, 0, 0),
- "", javax.swing.border.TitledBorder.CENTER,
- javax.swing.border.TitledBorder.BOTTOM,
- new java.awt.Font("Dialog", java.awt.Font.BOLD,
- 12), java.awt.Color.red), dialogPane
- .getBorder()));
- dialogPane
- .addPropertyChangeListener(new java.beans.PropertyChangeListener() {
- @Override
- public void propertyChange(
- java.beans.PropertyChangeEvent e) {
- if ("border".equals(e.getPropertyName()))
- throw new RuntimeException();
- }
- });
- dialogPane.setLayout(new BorderLayout());
- // ======== contentPanel ========
- {
- // ---- label1 ----
- label1.setText("Welcome to Robert G's GuildFisher!");
- label1.setFont(new Font("Georgia", Font.BOLD, 12));
- // ---- label2 ----
- label2.setText("Select fish to catch:");
- // ---- fishSelected ----
- fishSelected.setModel(new DefaultComboBoxModel(fishingType.values()));
- // ---- label3 ----
- label3.setText("By default the script will bank ");
- // ---- checkBox1 ----
- checkBox1.setText("tick here for powerfishing mode.");
- GroupLayout contentPanelLayout = new GroupLayout(
- contentPanel);
- contentPanel.setLayout(contentPanelLayout);
- contentPanelLayout
- .setHorizontalGroup(contentPanelLayout
- .createParallelGroup()
- .addGroup(
- contentPanelLayout
- .createSequentialGroup()
- .addGroup(
- contentPanelLayout
- .createParallelGroup()
- .addComponent(
- label1)
- .addGroup(
- contentPanelLayout
- .createSequentialGroup()
- .addComponent(
- label2)
- .addPreferredGap(
- LayoutStyle.ComponentPlacement.UNRELATED)
- .addComponent(
- fishSelected,
- GroupLayout.PREFERRED_SIZE,
- 100,
- GroupLayout.PREFERRED_SIZE))
- .addGroup(
- contentPanelLayout
- .createSequentialGroup()
- .addComponent(
- label3)
- .addPreferredGap(
- LayoutStyle.ComponentPlacement.UNRELATED)
- .addComponent(
- checkBox1)))
- .addContainerGap(36,
- Short.MAX_VALUE)));
- contentPanelLayout
- .setVerticalGroup(contentPanelLayout
- .createParallelGroup()
- .addGroup(
- contentPanelLayout
- .createSequentialGroup()
- .addComponent(label1)
- .addGap(40, 40, 40)
- .addGroup(
- contentPanelLayout
- .createParallelGroup(
- GroupLayout.Alignment.TRAILING)
- .addComponent(
- label2)
- .addComponent(
- fishSelected,
- GroupLayout.PREFERRED_SIZE,
- GroupLayout.DEFAULT_SIZE,
- GroupLayout.PREFERRED_SIZE))
- .addGap(38, 38, 38)
- .addGroup(
- contentPanelLayout
- .createParallelGroup(
- GroupLayout.Alignment.BASELINE)
- .addComponent(
- label3)
- .addComponent(
- checkBox1))
- .addContainerGap(77,
- Short.MAX_VALUE)));
- }
- dialogPane.add(contentPanel, BorderLayout.WEST);
- // ======== buttonBar ========
- {
- buttonBar.setBorder(new EmptyBorder(12, 0, 0, 0));
- buttonBar.setLayout(new GridBagLayout());
- ((GridBagLayout) buttonBar.getLayout()).columnWidths = new int[] {
- 0, 80 };
- ((GridBagLayout) buttonBar.getLayout()).columnWeights = new double[] {
- 1.0, 0.0 };
- // ---- okButton ----
- okButton.setText("OK");
- okButton.addActionListener(new ActionListener() {
- @Override
- public void actionPerformed(ActionEvent e) {
- okButtonActionPerformed(e);
- }
- });
- buttonBar.add(okButton, new GridBagConstraints(1, 0, 1, 1,
- 0.0, 0.0, GridBagConstraints.CENTER,
- GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0,
- 0));
- }
- dialogPane.add(buttonBar, BorderLayout.SOUTH);
- }
- contentPane.add(dialogPane, BorderLayout.CENTER);
- pack();
- setLocationRelativeTo(getOwner());
- setVisible(true);
- }
- private JPanel dialogPane;
- private JPanel contentPanel;
- private JLabel label1;
- private JLabel label2;
- private JComboBox fishSelected;
- private JLabel label3;
- private JCheckBox checkBox1;
- private JPanel buttonBar;
- private JButton okButton;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment