Results 1 to 3 of 3
  1. #1
    pbd2 is offline Member
    Join Date
    Oct 2008
    Posts
    2
    Rep Power
    0

    Default Help making a main menu.

    Hello guys I was wondering if you guys could help me.

    Im trying to make a main menu which is displayed to the user when they load my applet.
    Im using 3 JButtons on one applet.

    I have 3 separate applets I want to be accessible by clicking a button on the menu.
    So the user presses a button and they are displayed the required applet. I have each applet working separately but cannot get the menu I require to work.

    So does anyone have any idea how to make JButtons show another applet in place of the menu?
    It would be great if each applet could pass a value between each other too such as a score.

    Any help would be great
    Thanks
    pbd2

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,578
    Rep Power
    25

    Default

    how to make JButtons show another applet in place of the menu?
    The Applet class extends Panel. You could use normal component add/remove methods to show an applet as a panel in your GUI.
    However, that applet would not have access to the AppletStub and AppletContext without some code on your part.
    Applets in your app could use normal methods to call methods in each other as with any other class.

    How do you expect these 3 applets to communicate with a browser? Do each of them have their own "window" in an HTML page shown by a browser or what?

  3. #3
    pbd2 is offline Member
    Join Date
    Oct 2008
    Posts
    2
    Rep Power
    0

    Default

    I was kind of thinking just having one window and then the current applet selected is shown there. Ill give your method a go and see what happens :p
    Thanks

Similar Threads

  1. Replies: 5
    Last Post: 10-06-2008, 12:11 AM
  2. Fill a menu dynamically when menu is shown
    By Java Tip in forum SWT Tips
    Replies: 0
    Last Post: 07-07-2008, 04:47 PM
  3. making a .main file
    By h3ckf1r3 in forum NetBeans
    Replies: 4
    Last Post: 06-30-2008, 07:42 AM
  4. React to menu action and checkbox menu
    By Java Tip in forum javax.swing
    Replies: 0
    Last Post: 06-27-2008, 07:50 PM
  5. Replies: 7
    Last Post: 05-09-2008, 07:54 AM

Posting Permissions

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