DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2006

    Mutiple Choice quiz applet

    Okay, I've written a class to generate 5 random multiple choice questions with JRadioButton Answer choices in an applet using a Container initialized with JApplets getContentPane() method. The problem I am having is that every time I try to add more than one component to my container it only displays the last component added to the container. Also the standard layout for a container should be FlowLayout. But the RadioButtons only display in the middle of the screen.

    Any help with this problem would be appreciated. The latter problem is minor detail so if you could focus on the component problem.


  2. #2
    Join Date
    Aug 2003
    Try adding a JPanel to the applet and then putting your buttons in there. Also, you could try explicitly setting the layout with setLayout(new FlowLayout())

Similar Threads

  1. JavaMail applet problem
    By Tataroz T. in forum Java
    Replies: 1
    Last Post: 10-20-2005, 06:19 AM
  2. Bouncing Ball Applet
    By nescafe in forum Java
    Replies: 1
    Last Post: 10-07-2005, 08:51 AM
  3. Java applet to VB
    By Maurice in forum Java
    Replies: 0
    Last Post: 02-11-2003, 01:10 AM
  4. Replies: 3
    Last Post: 08-23-2001, 11:01 AM
  5. Replies: 0
    Last Post: 03-28-2000, 01:52 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
HTML5 Development Center
Latest Articles
Questions? Contact us.
Web Development
Latest Tips
Open Source

   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.