Sheperdebops 0 Share Posted May 10, 2018 Hello everyone im having problems with creating a GUI when i call createGUI in onStart() nothings happens heres my code package org.dreambot.sheperdebops; import org.dreambot.api.script.Category; import org.dreambot.api.script.ScriptManifest; import org.dreambot.api.script.AbstractScript; import org.dreambot.api.wrappers.interactive.GameObject; import javax.swing.*; import java.awt.*; @ScriptManifest(category = Category.MINING, description = "Auto Mines then Smiths and banks Iron", name = "AIO Process", author = "Sheperdebops", version = 0.1) public class Main extends AbstractScript{ private boolean isRunning; private String Ore; private boolean Bank; private boolean Smith; private boolean useGE; @Override public void onStart() { createGUI(); } private void createGUI() { JFrame frame = new JFrame(); frame.setTitle("Auto Miner"); frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); frame.setLocationRelativeTo(getClient().getInstance().getCanvas()); frame.setPreferredSize(new Dimension( 400, 500)); JPanel settingPanel = new JPanel(); settingPanel.setLayout(new GridLayout( 0 ,2)); JLabel MaterialLabel = new JLabel(); MaterialLabel.setText("Select Ingot"); settingPanel.add(MaterialLabel); } @Override public void onPaint(Graphics Label) { Label.setColor(Color.BLACK); Label.fillRect( 10, 50, 220, 25); Label.setColor((Color.WHITE)); Label.drawString( "AIO Process by Sheperdebops - v0.2", 15, 65 ); } @Override public int onLoop() { return 1000; } } Link to comment Share on other sites More sharing options...
Manly 879 Share Posted May 10, 2018 Have you tried setting its visibility? Link to comment Share on other sites More sharing options...
Sheperdebops 0 Author Share Posted May 10, 2018 5 minutes ago, Man16 said: Have you tried setting its visibility? of course java visibility is automatically set to false. im used to C++ and C# thanks a bunch!! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.