Back | Reverse |

Linking multpile GUI java?
Link | by hello on 2010-05-14 17:00:29 (edited 2010-05-14 17:03:05)
Currently, I'm building a file in java that requires multiple user interfaces. How do I link them together? Google didn't help.

Oh, when I mean link, I mean: GUI1, I store an array full of objects. Now, I switch to GUI2, and am still able to access/modify that array full of objects.

Only solution I have is to build all the GUI's in one massive class, and have those variables instantiated in the very beginning before main methods, but I keep getting "can not find symbol class". So I try making GUI2 as a separate class, but I lose all access to variables modified in GUI1.

I've hit a road block ;_;

No.

Re: Linking multpile GUI java?
Link | by gendou on 2010-05-14 19:09:43
What is the difference between GUI1 and GUI2?


Re: Linking multpile GUI java?
Link | by hello on 2010-05-14 19:14:32 (edited 2010-05-14 19:15:55)
GUI1 is like a "do everything" interface, while GUI2 is "sign up" interface. How they link: Through sign up, I input data, then it closes when pressing the ok button. Then, with the "do everything" interface, i can modify data entered through the "sign up" interface.

No.

Re: Linking multpile GUI java?
Link | by gendou on 2010-05-14 19:27:02 (edited 2010-05-14 19:28:42)
You can use extends to create a hierarchy of interface classes:
class gui_admin extends gui_signup
gui_admin will call it's super-constructor to set up the basic interface, then add the advanced elements to the GUI explicitly.

does that make sense?


Re: Linking multpile GUI java?
Link | by hello on 2010-05-14 19:45:00
I figured that extends only takes methods from the parent class. Didn't know about taking variables too. Gosh I feel stupid. Thanks for helping me (can close thread now).

No.

Back | Reverse |

Copyright 2000-2024 Gendou | Terms of Use | Page loaded in 0.0023 seconds at 2024-12-30 11:48:56