Jump to content

Search the Community

Showing results for tags 'swt gui scripting'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • OSBot
    • News & Announcements
    • Community Discussion
    • Bot Manager
    • Support Section
    • Mirror Client VIP
    • Script Factory
  • Scripts
    • Official OSBot Scripts
    • Script Factory
    • Unofficial Scripts & Applications
    • Script Requests
  • Market
    • OSBot Official Voucher Shop
    • Currency
    • Accounts
    • Services
    • Other & Membership Codes
    • Disputes
  • Graphics
    • Graphics
  • Archive

Product Groups

  • Premium Scripts
    • Combat & Slayer
    • Money Making
    • Minigames
    • Others
    • Plugins
    • Agility
    • Mining & Smithing
    • Woodcutting & Firemaking
    • Fishing & Cooking
    • Fletching & Crafting
    • Farming & Herblore
    • Magic & Prayer
    • Hunter
    • Thieving
    • Construction
    • Runecrafting
  • Donations
  • OSBot Membership
  • Backup

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


MSN


Website URL


ICQ


Yahoo


Skype


Location:


Interests

Found 1 result

  1. Athylus

    SWT GUI

    There is a problem with my GUI. I am trying to use SWT for this. I made a separate class next to my main one called GUI, in it I have a SWT GUI which has a combo box and a start script button. import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Event; import org.eclipse.swt.widgets.Listener; import org.eclipse.swt.widgets.Shell; import org.eclipse.swt.widgets.Combo; import org.eclipse.swt.SWT; import org.eclipse.swt.widgets.Button; import org.eclipse.swt.graphics.Point; public class GUI { public String treeName; public static String errorMessage; protected Shell shell; /** * Launch the application. * @param args */ public static void main(String[] args) { try { GUI window = new GUI(); window.open(); } catch (Exception e) { errorMessage = "Error"; } } /** * Open the window. */ public void open() { Display display = Display.getDefault(); createContents(); shell.open(); shell.layout(); while (!shell.isDisposed()) { if (!display.readAndDispatch()) { display.sleep(); } } } /** * Create contents of the window. */ protected void createContents() { shell = new Shell(); shell.setMinimumSize(new Point(136, 40)); shell.setSize(272, 240); shell.setText("SWT Application"); shell.setLayout(null); Combo combo = new Combo(shell, SWT.READ_ONLY); combo.setBounds(66, 44, 128, 23); combo.setItems(new String[] {"Tree", "Oak", "Willow", "Maple", "Yew", "Magic"}); combo.select(0); Button btnNewButton = new Button(shell, SWT.NONE); btnNewButton.setBounds(66, 108, 128, 54); btnNewButton.setText("Start script"); btnNewButton.addListener(SWT.Selection, new Listener() { @Override public void handleEvent(Event e) { treeName = combo.getText(); shell.close(); } }); } } In my main: public void onStart() { GUI gui = new GUI(); } It's not even showing up! The logger is giving me some error messages. Uncaught exception! java.lang.NoClassDefFoundError: org/eclipse/swt/widgets/Composite at Main.onStart(Main.java:26) at org.osbot.rs07.event.ScriptExecutor.IiIiiiiiIiIi(yl:197) at org.osbot.rs07.event.ScriptExecutor.start(yl:28) at org.osbot.Lb.run(vf:245) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Caused by: java.lang.ClassNotFoundException: org.eclipse.swt.widgets.Composite at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) ... 7 more [INFO][Bot #1][02/05 05:34:10 PM]: Terminating script Skeleton... [INFO][Bot #1][02/05 05:34:10 PM]: Script Skeleton has exited! Is it possible to make SWT work with OSBot?
×
×
  • Create New...