Mutiple Choice quiz applet


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Mutiple Choice quiz applet

Hybrid View

  1. #1
    Join Date
    Jun 2006
    Posts
    1

    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.

    Thanks.

  2. #2
    Join Date
    Aug 2003
    Posts
    313
    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())
    ~evlich

Similar Threads

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


   Development Centers

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