Results 1 to 11 of 11

Thread: [RESOLVED] class to class

  1. #1

    Thread Starter
    Hyperactive Member Greyskull's Avatar
    Join Date
    Dec 2003
    Location
    somewhere in England
    Posts
    382

    Resolved [RESOLVED] class to class

    Hello all,

    Back with another java problem but this time its not as complex as my previous ones (hopefully). I'm just wondering if i can run one Jframe to another just like in vb such as going from one form to another by hiding / destroying the previous one and showing the next one.

    The only solution i could think of at the moment is to have one class containing the main method which will control everythin such as the following algorithm:

    Main Class

    -Run frame one
    -dispose frame one
    -run frame two
    - dispose frame two

    End of main

    will this idea work?

    Thanks in advance
    Please go to the Thread Tools menu and click Mark Thread Resolved when your post is answered
    If someone helped you today then please consider rating their post.

  2. #2
    Arabic Poster ComputerJy's Avatar
    Join Date
    Nov 2005
    Location
    Happily misplaced
    Posts
    2,513

    Re: class to class

    yes it should work if implemented correctly. But why do you need to show the first jframe, close it then show the other?
    "I'm not normally a praying man, but if you're up there, save me... Superman!" - Homer Simpson
    My Blog

  3. #3

    Thread Starter
    Hyperactive Member Greyskull's Avatar
    Join Date
    Dec 2003
    Location
    somewhere in England
    Posts
    382

    Re: class to class

    Thanks, ill give it a whiz after completing the 30 page documentation. Well im creating a letter recognition software which will consist of different stages and each stage will have its own GUI. Having different classes with different GUIs was the solution i came up with hence me wondering if this could actually work.
    Please go to the Thread Tools menu and click Mark Thread Resolved when your post is answered
    If someone helped you today then please consider rating their post.

  4. #4

    Thread Starter
    Hyperactive Member Greyskull's Avatar
    Join Date
    Dec 2003
    Location
    somewhere in England
    Posts
    382

    Re: class to class

    Quote Originally Posted by ComputerJy
    why do you need to show the first jframe, close it then show the other?
    Is there another way i could do this? thanks in advance..
    Please go to the Thread Tools menu and click Mark Thread Resolved when your post is answered
    If someone helped you today then please consider rating their post.

  5. #5
    Arabic Poster ComputerJy's Avatar
    Join Date
    Nov 2005
    Location
    Happily misplaced
    Posts
    2,513

    Re: class to class

    I mean I've never seen an application do that. Only with a splash screen. Is that what you're doing?
    "I'm not normally a praying man, but if you're up there, save me... Superman!" - Homer Simpson
    My Blog

  6. #6

    Thread Starter
    Hyperactive Member Greyskull's Avatar
    Join Date
    Dec 2003
    Location
    somewhere in England
    Posts
    382

    Re: class to class

    kinda. what i wanted it to look like is similar to the way the first few screens on a game are shown: advertisements, sponsors, etc..but instead it will have the following sequence:

    1st Frame: Get image from user - via webcam or browse from file
    2nd Frame: Display image with analysed letters beside it along with buttons for accessibility (i.e reading the text for them)
    3rd Frame: more functions, etc..

    Any ideas on how to do this apart from that method?
    Please go to the Thread Tools menu and click Mark Thread Resolved when your post is answered
    If someone helped you today then please consider rating their post.

  7. #7
    Arabic Poster ComputerJy's Avatar
    Join Date
    Nov 2005
    Location
    Happily misplaced
    Posts
    2,513

    Re: class to class

    so I can call them JDialogs instead of frames, right?

    showing them from the main menu is acceptable but a very great idea
    "I'm not normally a praying man, but if you're up there, save me... Superman!" - Homer Simpson
    My Blog

  8. #8

    Thread Starter
    Hyperactive Member Greyskull's Avatar
    Join Date
    Dec 2003
    Location
    somewhere in England
    Posts
    382

    Re: class to class

    you can if you wana but frames would still be more suitable imo newayz as i can add containers and components that can display the current output of the cam. nt sure whether u can do this with normal JDialogs though...

    thanks
    Please go to the Thread Tools menu and click Mark Thread Resolved when your post is answered
    If someone helped you today then please consider rating their post.

  9. #9
    Arabic Poster ComputerJy's Avatar
    Join Date
    Nov 2005
    Location
    Happily misplaced
    Posts
    2,513

    Re: class to class

    you can. But that's not the problem now.

    So did the way you suggested work? If not please show us some code
    "I'm not normally a praying man, but if you're up there, save me... Superman!" - Homer Simpson
    My Blog

  10. #10

    Thread Starter
    Hyperactive Member Greyskull's Avatar
    Join Date
    Dec 2003
    Location
    somewhere in England
    Posts
    382

    Re: class to class

    Havent done this yet, will try this out tomorrow as im finishing some of the documentation i have to do as well. but will defo inform ya on how it went, thanks

    Greyskull
    Please go to the Thread Tools menu and click Mark Thread Resolved when your post is answered
    If someone helped you today then please consider rating their post.

  11. #11

    Thread Starter
    Hyperactive Member Greyskull's Avatar
    Join Date
    Dec 2003
    Location
    somewhere in England
    Posts
    382

    Re: [RESOLVED] class to class

    Yup it did work. Thanks for the time ComputerJy
    Please go to the Thread Tools menu and click Mark Thread Resolved when your post is answered
    If someone helped you today then please consider rating their post.

Posting Permissions

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



Click Here to Expand Forum to Full Width