Results 1 to 3 of 3
  1. #1
    rasen58 is offline Member
    Join Date
    Oct 2012
    Posts
    15
    Rep Power
    0

    Default Using JPanel to switch between JFrame and JApplet

    Hi, I want to make my program be able to switch between a desktop version and a website version, so I want to make a JPanel and have everything inside there and put the panel inside either a JFrame or JApplet.

    Can someone give me an example of how I would do this? Maybe show how to add two numbers using Swing?

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,236
    Rep Power
    19

    Default Re: Using JPanel to switch between JFrame and JApplet

    Quote Originally Posted by rasen58 View Post
    Can someone give me an example of how I would do this?
    Not without seeing your own efforts first. This is a forum, not a code factory.

    Better go through the tutorial and learn how to use Swing: Trail: Creating a GUI With JFC/Swing (The Java™ Tutorials)

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  3. #3
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,236
    Rep Power
    19

    Default Re: Using JPanel to switch between JFrame and JApplet

    You don't appear to return to any of the threads you start, so what's the use of replying?

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

Similar Threads

  1. JApplet in JFrame...
    By Rolf83 in forum Java Applets
    Replies: 8
    Last Post: 06-03-2011, 05:15 PM
  2. Making a JApplet into a JFrame into a .jar
    By aqualicy in forum Java Applets
    Replies: 2
    Last Post: 05-14-2010, 04:29 AM
  3. Need help in switch JPanel
    By chyeeqi in forum NetBeans
    Replies: 2
    Last Post: 03-19-2010, 04:10 AM
  4. JFrame to JApplet or JApplet to JApplet
    By ramesh.8189 in forum AWT / Swing
    Replies: 13
    Last Post: 02-08-2009, 06:14 AM
  5. Problems while loading a JPanel to JApplet...
    By Ananth Chellathurai in forum Java Applets
    Replies: 0
    Last Post: 11-24-2007, 10:47 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
  •