Results 1 to 14 of 14
  1. #1
    ramesh.8189 is offline Member
    Join Date
    Feb 2009
    Location
    India
    Posts
    23
    Rep Power
    0

    Default JFrame to JApplet or JApplet to JApplet

    i wish to develop an event handling code. a JFrame contains a buttonn. on clicking that,the frame should disappear and a JApplet should appear. i used setVisible(false) in actionPerformed which worked. the frame disappeared. but for making the applet appear i did call init method of applet. but it dint appear.

    can anyone help?

    i successfully executed 'Frame->Frame transition' but 'Frame->Applet' or 'Applet->Applet' could not be done. suggest me some solutions

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default

    This confuses me as a Java object can't create the applet (as far as I know), but instead it's called on and created by HTML code.

    Why would you ever want to do this? When would you ever have the need?

  3. #3
    ramesh.8189 is offline Member
    Join Date
    Feb 2009
    Location
    India
    Posts
    23
    Rep Power
    0

    Default

    I'm Developing A Applet That Connects To Other Computer. I Wish To Add A Frame That Gets The Ip Address Of The Computer And When Ip S Entered It Should Bring Up The Applet.

  4. #4
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default

    Your explanation doesn't make much sense yet to me. Could you go into more detail why you want a JFrame to initiate and display an applet?

  5. #5
    ramesh.8189 is offline Member
    Join Date
    Feb 2009
    Location
    India
    Posts
    23
    Rep Power
    0

    Default

    hey
    a frame with a text field and button will come up by executing the program. After u ve entered IP address in the textfield and click the button, it should generate an applet that gets password for connectiong to that computer. can u get me now?

  6. #6
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default

    You're still not giving much in the way detail here, and since it's details that are all important, I'm still lost. Is the applet located on a server? Is it called by the server's HTML code? What password, where? What is the applet doing that a JFrame can't?

    Are you doing this over the internet or is this a network?
    What is the topology of the connections?

    etc...
    Last edited by Fubarable; 02-03-2009 at 05:01 AM.

  7. #7
    ramesh.8189 is offline Member
    Join Date
    Feb 2009
    Location
    India
    Posts
    23
    Rep Power
    0

    Default

    u know VNC viewer. Im developing such kinda product..

  8. #8
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default

    well, I wish you much luck with this project then.

  9. #9
    adrija_ghosh is offline Member
    Join Date
    Feb 2009
    Posts
    11
    Rep Power
    0

    Default

    Java applets are executed in a sandbox by most web browsers, preventing them from accessing local data. The code of the applet is downloaded from a web server and the browser either embeds the applet into a web page or opens a new window showing the applet's user interface. The applet can be displayed on the web page by making use of the deprecated applet HTML element [1], or the recommended object element [2]. This specifies the applet's source and the applet's location statistics.

  10. #10
    adrija_ghosh is offline Member
    Join Date
    Feb 2009
    Posts
    11
    Rep Power
    0

    Default

    Please refer to BPB publications books for your project regarding applet and swing....

  11. #11
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default

    Very nice answers adrija. Based on the answers (or lack of them) from the original poster to my questions, methinks that he first needs to learn basic Java before embarking on anything quite so ambitious.

  12. #12
    adrija_ghosh is offline Member
    Join Date
    Feb 2009
    Posts
    11
    Rep Power
    0

    Default

    I think I have answered in the wrong place......someone wanted the answer to these questions like "from where the applet gets executed?" etc......I was answering to many things together so this happened......

    if there is any lacking or wrong answer in wrong place then please clarify with the person before mocking........

  13. #13
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default

    I wasn't mocking you. If you got that impression, sorry. I was/am concerned about the original poster and his inability to even define what his problem truly is despite my multiple attempts to get him to do so. I think that he's getting way ahead of himself, that he needs to learn basic Java, to learn the differences between applets and stand-alone programs before he tries so ambitious a project.
    Last edited by Fubarable; 02-08-2009 at 06:06 AM.

  14. #14
    adrija_ghosh is offline Member
    Join Date
    Feb 2009
    Posts
    11
    Rep Power
    0

Similar Threads

  1. JApplet Problem
    By tanmoy.b81 in forum AWT / Swing
    Replies: 2
    Last Post: 07-28-2008, 06:56 AM
  2. JApplet problems
    By Rgfirefly24 in forum New To Java
    Replies: 2
    Last Post: 04-24-2008, 07:36 PM
  3. Database to JApplet
    By Preethi in forum New To Java
    Replies: 0
    Last Post: 03-26-2008, 05:18 AM
  4. Another problem in JApplet :S
    By juju in forum Java Applets
    Replies: 2
    Last Post: 12-30-2007, 07:46 PM
  5. JApplet and html
    By paty in forum Java Applets
    Replies: 1
    Last Post: 08-02-2007, 05:41 PM

Posting Permissions

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