Results 1 to 5 of 5
  1. #1
    Kblavkalash is offline Member
    Join Date
    May 2011
    Posts
    4
    Rep Power
    0

    Default Connecting different java files

    Hi guys I have a question about connecting different java files. I tried searching on internet but didn't really find much.

    So I have a main program and I have a separate file for applet. I want to connect those files so one can see another and I want to connect those buttons with actions. I am using Jigloo tool which makes making applets much easier.

    I don't expect you to explain me how that should work, but maybe simple example how to connect button from applet file with program code in another file. Or maybe place where can I learn that, because now I have no idea how to do that..

    Or maybe it's better to make everything in one file?
    Last edited by Kblavkalash; 05-14-2011 at 12:55 PM.

  2. #2
    dlorde is offline Senior Member
    Join Date
    Jun 2008
    Posts
    339
    Rep Power
    7

    Default

    I don't really understand what you're asking - can you explain what you are trying to achieve, i.e. what are you trying to do with the applet?

    If you want to know how one class or applet (in it's own .class file) can access another class in a different .class file, then you need to read up about packages and the classpath. If you want to know how to deploy an application consisting of a number of .class files, you should read up about jar files, which are a kind of zip file containing all the .class files and resources needed for an application or module.

  3. #3
    sunde887's Avatar
    sunde887 is offline Moderator
    Join Date
    Jan 2011
    Location
    Richmond, Virginia
    Posts
    3,069
    Blog Entries
    3
    Rep Power
    8

    Default

    Diocese suggestion may be what you want, but in case you are wondering how to allow one class to have access to a separate classes instance variables(buttons), you will need to pass a reference to the next class of the first class.

    With more clarification of what you want I may be able to help more.

  4. #4
    Kblavkalash is offline Member
    Join Date
    May 2011
    Posts
    4
    Rep Power
    0

    Default

    I wrote my full program and now appears I need to change a lot of code to make a program with applets. Or maybe there is faster way of doing this?

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

    Default

    Quote Originally Posted by Kblavkalash View Post
    I wrote my full program and now appears I need to change a lot of code to make a program with applets. Or maybe there is faster way of doing this?
    No idea based on what you've posted. Please have a look at the link in my signature links below on how to ask smart questions and that will give you many tips on how to ask a question in here that is answerable and that doesn't require that we continually ask you for clarification and more information.

Similar Threads

  1. Replies: 8
    Last Post: 07-30-2010, 06:47 PM
  2. Java connecting to sql database
    By markious in forum New To Java
    Replies: 3
    Last Post: 04-14-2010, 10:58 PM
  3. connecting unixbox using java
    By 435.mahesh in forum Java Software
    Replies: 2
    Last Post: 04-24-2009, 04:16 PM
  4. Connecting c with java
    By khajalid in forum Networking
    Replies: 6
    Last Post: 12-10-2008, 10:35 PM
  5. Connecting c with java
    By khajalid in forum Advanced Java
    Replies: 4
    Last Post: 09-11-2008, 05: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
  •