Results 1 to 4 of 4
  1. #1
    jprog123 is offline Member
    Join Date
    Feb 2014
    Posts
    2
    Rep Power
    0

    Default Open GUI on top of another GUI

    I have built a GUI in eclipse using the SWT designer and want to open a second GUI on top of it when a certain button is clicked (I have designed the second GUI in eclipse as well), currently all I have is "new [name of GUI]();" as seen in the 4th line (the name of the gui I want to open is called 'edit'), but I think there is more to it, any help is most appreciated.

    Button btnEdit = new Button(shell, SWT.NONE);
    btnEdit.addSelectionListener(new SelectionAdapter() {
    @Override
    public void widgetSelected(SelectionEvent e) {
    new edit();
    }
    });
    btnEdit.setBounds(76, 10, 75, 25);
    btnEdit.setText("Edit");

  2. #2
    KevinWorkman's Avatar
    KevinWorkman is online now Crazy Cat Lady
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    3,939
    Rep Power
    8

    Default Re: Open GUI on top of another GUI

    What does that code do when you run it?
    How to Ask Questions the Smart Way
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  3. #3
    jprog123 is offline Member
    Join Date
    Feb 2014
    Posts
    2
    Rep Power
    0

    Default Re: Open GUI on top of another GUI

    this is the portion for a button in a GUI I created, when I run it it brings up the GUI and when I click the button basically nothing happens, ideally I want the other GUI I created (called 'edit' as seen in the 5th line) to be created

  4. #4
    KevinWorkman's Avatar
    KevinWorkman is online now Crazy Cat Lady
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    3,939
    Rep Power
    8

    Default Re: Open GUI on top of another GUI

    Without seeing an SSCCE, it's pretty impossible to tell you what's wrong with your code. We have no idea what the edit class (which should be Edit) does, so we can't tell you why it doesn't work.
    How to Ask Questions the Smart Way
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

Similar Threads

  1. Different Files Open in File -> Open Workspace
    By mgm2010 in forum JCreator
    Replies: 0
    Last Post: 04-11-2009, 02:14 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •