Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: WindowBuilder - How do I open a seperate class window by a button?

  1. #1
    Junior Member
    Join Date
    Jul 2012
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default WindowBuilder - How do I open a seperate class window by a button?

    Okay I have 2 classes with different windows constructed in them. I want a button from my main window to open the window in my other class, I've searched a lot on google, I'm either not understanding it or it's not what I'm looking for. This forum looks very friendly and willing to help newbies so I joined

    Thanks,
    Luke.


  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,140
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: WindowBuilder - How do I open a seperate class window by a button?

    The button listener in the main class needs a reference to the instance of the other class so it can call a method in the other class where the window can be opened.
    If you don't understand my answer, don't ignore it, ask a question.

Similar Threads

  1. JButton open new window
    By iEpic in forum AWT / Java Swing
    Replies: 2
    Last Post: July 19th, 2012, 10:36 PM
  2. Im trying to open a new GUI window by clicking on a button
    By amzwans in forum What's Wrong With My Code?
    Replies: 2
    Last Post: August 10th, 2011, 11:33 PM
  3. Switching between frames from a seperate class
    By kurt-hardy in forum AWT / Java Swing
    Replies: 4
    Last Post: February 14th, 2011, 04:19 AM
  4. How to press button to open another window
    By vkokaram in forum AWT / Java Swing
    Replies: 1
    Last Post: July 18th, 2010, 03:51 PM
  5. Facing problem with open modeless dialog from modal window
    By Divya in forum Java Theory & Questions
    Replies: 1
    Last Post: May 14th, 2009, 03:18 AM