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: Help with mouselistener and mousemotionlistener pls..

  1. #1
    Junior Member
    Join Date
    Mar 2011
    Location
    philippines
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Smile Help with mouselistener and mousemotionlistener pls..

    ok I am trying to make a code that when you open the appletviewer there are 2 boxes to click that says "start"- it will go to a new page, where u can play a game I made...the game is called game.java...then the other box to click is credits where you can see my picture and description about me, my problem is, I don't know how to create a new page? any idea's how to create that?

    so it goes like this in short

    Open appplet viewer:

    MAIN- Shown in the screen in applet viewer:

    "Start"
    "Credits"

    START- Shown in the screen in applet viewer:
    (The game I made by using java, its just a simple click box coloring thing..noob style.. )

    then there is a "Back" Button to return from the MAIN page.

    Credits- Shown in the screen in applet viewer:

    My picture and description

    Then there is a "Back" Button to return from the MAin Page.

    I already made my Main, Game, and Credits, I just don't know how to put them together and show it in the applet viewer, I don't even know how to make the back button to return to the main...help pls..so confused...hope you understood my problem and could help me out...
    __________________________________________________ _____________________________
    LIVELOVE LAUGH


  2. #2
    Administrator copeg's Avatar
    Join Date
    Oct 2009
    Location
    US
    Posts
    5,372
    Thanks
    184
    Thanked 836 Times in 779 Posts
    Blog Entries
    5

    Default Re: Help with mouselistener and mousemotionlistener pls..

    The following tutorial should give you a lot of information
    Lesson: Using Swing Components (The Java™ Tutorials > Creating a GUI With JFC/Swing)
    I'm not sure what the title has to do with your post - if you want to listen for Button events you should use an ActionListener (see the link)

    If you want more specific advice, I'd recommend posting a more specific question, preferably with code (in the form of an SSCCE) with all errors in their entirety.

Similar Threads

  1. MouseListener accumulating mouse clicks
    By mycallsevern in forum What's Wrong With My Code?
    Replies: 5
    Last Post: February 19th, 2011, 02:15 PM
  2. MouseListener
    By _lithium_ in forum What's Wrong With My Code?
    Replies: 2
    Last Post: January 18th, 2011, 11:43 AM
  3. [SOLVED] implements MouseListener doesn't work why
    By voltaire in forum AWT / Java Swing
    Replies: 2
    Last Post: May 1st, 2010, 05:30 PM
  4. MouseListener & MouseMotionListener
    By JavaLearner in forum AWT / Java Swing
    Replies: 9
    Last Post: March 26th, 2010, 08:18 AM
  5. MouseMotionListener is not updating my variable
    By olemagro in forum AWT / Java Swing
    Replies: 1
    Last Post: February 8th, 2010, 03:44 PM